apeirotope/2021-04-16T00:00:00+01:00dudley dodos: everyone can learn about the environment2021-04-16T00:00:00+01:002021-04-16T00:00:00+01:00corcratag:None,2021-04-16:life/2021-04-16-dodos.html<p>When I was born in 1989, the CO2 concentration in the atmosphere was 350 parts per million. 350 parts per million is also considered the safe upper limit for atmospheric CO2, giving rise to the climate group <a href="https://350.org/">350.org</a>, which was founded in 2007. Today atmospheric CO2 is around 407 …</p><p>When I was born in 1989, the CO2 concentration in the atmosphere was 350 parts per million. 350 parts per million is also considered the safe upper limit for atmospheric CO2, giving rise to the climate group <a href="https://350.org/">350.org</a>, which was founded in 2007. Today atmospheric CO2 is around 407 ppm. In 2007 it was about 380 ppm. When my parents were born, it was less than 315 ppm. You can read more numbers like this <a href="https://www.co2.earth/monthly-co2">here</a>.</p>
<p>1989 is also the year a <a href="https://boardgamegeek.com/boardgame/17844/dudley-dodos-environment-game/ratings">"1.5/10" board game</a> called Dudley Dodos was published. As recognised by BoardGameGeek reviewers, the game is essentially an "eco-friendly" trivial pursuit knockoff. I don't know how old I was or how often we played this game when I was a child, but it's lodged in my memory alongside The Animals of Farthing Wood and stacks of National Geographic magazines, filed under "reasons I ended up like this".</p>
<p><img src="images/2021/dodos/box.png" style="width: 75%"></p>
<p>I was lucky to be in Dublin over Christmas this year and cracked open the box (my parents still have it, of course). The gameplay consists of answering environment-themed trivia questions and moving around a board, presumably for some end goal I no longer remember.</p>
<p><img src="images/2021/dodos/board.png" style="width: 75%"></p>
<p>It has a Monopoly-esque mechanic of giving you random cards when you land on certain spaces. In <a href="https://www.theguardian.com/lifeandstyle/2015/apr/11/secret-history-monopoly-capitalist-game-leftwing-origins">Monopoly</a> these cards say things like "Go back three spaces" or "You have won second prize in a beauty contest, collect $10". In Dudley Dodos they're called "environment" cards, and they're a little different. In this post I'm going to go through them all. Let's start with the nice ones.</p>
<p><img src="images/2021/dodos/hibernation.png" title="DUDLEY DODO'S EMERGENCE FROM HIBERNATION WILL HELP MAKE EVERYONE MORE AWARE OF OUR FRAGILE ENVIRONMENT" style="width: 75%"></p>
<p>The protagonist of the game is the eponymous Dudley Dodo, a dodo who has evidently emerged from hibernation to help make everyone more aware of our fragile environment. He wears cute boots and has a big heart on his chest.</p>
<p><img src="images/2021/dodos/cfcs.png" style="width: 75%" title="THE REDUCTION OF CFC'S IN AEROSOLS IS HELPING THE OZONE LAYER, WHICH IN TURN IS REDUCING THE THREAT FROM THE GREENHOUSE EFFECT"></p>
<p>The ban on CFCs was introduced by an international 1987 treaty called the Montreal Protocol, which came into force shortly before I was born. <a href="https://www.rapidtransition.org/stories/back-from-the-brink-how-the-world-rapidly-sealed-a-deal-to-save-the-ozone-layer/">Incredibly</a>, the treaty was brought into effect a mere ~14 years after CFCs were first discovered to be harmful to the ozone layer, and 2 years after a hole in the ozone layer was discovered over Antarctica. Today in 2021, <a href="https://ourworldindata.org/ozone-layer#when-is-the-ozone-layer-expected-to-recover">the hole is still here</a>, however its size has stabilised in the last 20 years or so, and there is evidence it is beginning to recover. <a href="https://svs.gsfc.nasa.gov/30889">You can look at it here</a>.</p>
<p><img src="images/2021/dodos/leadfree.png" style="width: 75%" title="THE USE OF LEAD FREE PETROL IS REDUCING THE THREAT OF ACID RAIN"></p>
<p>and</p>
<p><img src="images/2021/dodos/cleaner.png" style="width: 75%" title="THE USE OF CLEANER AND MORE ENVIRONMENT-FRIENDLY SOURCES OF POWER WILL REDUCE 'ACID RAIN' AND PRESERVE THE OZONE LAYER"></p>
<p>Holes in the ozone layer, acid rain! It certainly feels like environmentalist discourse has moved on since 1989. I guess there was that mention of the greenhouse effect on the previous card, but that's probably not going to come up again.</p>
<p>Acid rain is one of those things I remember hearing about as a child (<em>I wonder where from</em>), and which doesn't get mentioned very often any more. <a href="https://slate.com/technology/2009/08/whatever-happened-to-acid-rain.html">I'm not the only one who's confused by this</a>. <a href="https://www.irishtimes.com/news/science/what-made-the-acid-rain-myth-finally-evaporate-1.900603">According to this guy</a>, acid rain was basically caused by emissions from coal-fired power stations. Since there are now <s>zero</s>four coal-fired power stations in the UK, I guess it's just not a problem any more. <a href="https://www.carbonbrief.org/six-charts-show-mixed-progress-for-uk-renewables">To be more specific</a>, in 1989 the UK was generating 67 Mtoe (Mtoe = millions of tonnes of oil equivalent) of energy from coal, whereas in 2017 it was 10.1 Mtoe and is presumably only going down. At least if there's one thing we can all agree on in 2021, it's that coal is on the way out. What's that, the UK government is <a href="https://www.bbc.co.uk/news/science-environment-55668507"><em>building a new coal mine in Cumbria?</em></a></p>
<p><img src="images/2021/dodos/eastwest.png" style="width: 75%" title="THE EASING OF EAST-WEST RELATIONS AND THE SIGNING OF TREATIES HAS HELPED REDUCE THE THREAT OF DISASTROUS WORLD WARS"></p>
<p>Love the cold war energy off this one. Beyond being an affront to humanity, the machinery of war contributes to the climate crisis and is terrible for the environment.</p>
<blockquote>
<p>"The U.S. Department of Defense has a larger annual carbon footprint than most countries on earth. With a sprawling network of bases and logistics networks, the U.S. military is the single biggest emitter of carbon dioxide in the world aside from whole nation-states themselves." <a href="https://theintercept.com/2019/09/15/climate-change-us-military-war/">Murtaza Hussain citing Neta Crawford</a>.</p>
</blockquote>
<p>I don't know if the level of ambient warfare has decreased since 1989, but we seem to have avoided having any more <em>world</em> wars.</p>
<p><img src="images/2021/dodos/recycled.png" style="width: 75%" title="WE ARE NOW USING MORE RE-CYCLED PAPER WHICH IS SAVING OUR PRECIOUS STOCKS OF TREES"></p>
<p>Okay, so we might still be losing forests but <a href="https://theconversation.com/forest-loss-has-halved-in-the-past-30-years-latest-global-update-shows-46932">the <em>rate</em> of deforestation has decreased since 1990</a>, and legally protected areas have been created, which <a href="http://www.fao.org/state-of-forests/en/">currently shelter 18% of the world's forest area</a>. The game comes across as a bit naive here - the <a href="https://www.wri.org/blog/2018/09/when-tree-falls-it-deforestation">biggest cause of <em>permanent</em> deforestation</a> isn't our lust for fresh paper - it's the conversion of forest land to something else, like agricultural monoculture (beef, palm oil, soy). If you're reading my blog you probably already know this, but just to be extra clear - most soy is grown to feed animals, not humans. Leave me and my beer-battered tofish and chips alone. Speaking of fish...</p>
<p><img src="images/2021/dodos/fishquotas.png" style="width: 75%" title="QUOTAS ON FISHING ARE HELPING TO MAINTAIN ADEQUATE STOCKS OF FISH"></p>
<p>In 1989, an estimated 86.9 million tons of fish were captured from the wild. <a href="https://www.nationalgeographic.com/environment/oceans/critical-issues-overfishing/">Apparently</a> yields have been declining ever since, and <a href="https://commons.wikimedia.org/wiki/File:Global_trends_in_the_state_of_the_world%E2%80%99s_marine_fish_stocks.svg">things basically look fucked</a> - although if you want nuanced details, you could read <a href="http://www.fao.org/3/ca9229en/ca9229en.pdf">this UNFAO report into sustainable fishing</a>. On the upside, <a href="https://www.bas.ac.uk/media-post/humpback-whales-return-to-south-georgia/">humpback whales</a> have returned to South Georgia after losing over 90% of their population to commercial whaling in the 20th century.</p>
<p>A lot of people in the world depend on the sea for their protein... <em>do you</em>?</p>
<p><img src="images/2021/dodos/governments.png" style="width: 75%" title="GOVERNMENTS ARE BOWING TO PUBLIC PRESSURE AND ARE BECOMING MORE CONCERNED ABOUT HOW WE LOOK AFTER OUR PLANET"></p>
<p>hahahahahaha next</p>
<p>Okay but seriously, the UN Framework Convention on Climate Change came into being in 1992 with its inaugural summit in Rio. In 1997 they created the Kyoto protocol which legally bound signing countries to reduce their greenhouse gas emissions. The US didn't participate in this because they are big babies (except that real babies would support climate action as a matter of survival). My subjective assessment is that governments have been making lots of claims in recent years ("net zero by 2050", "petrol car sales ban by 2030", "leopards will eat some faces, but not <em>yours</em>"). According to the <a href="https://climateactiontracker.org/global/cat-thermometer/">Climate Action Tracker</a>, current <em>pledges</em> put us somewhere near 2.1 to 2.6 degrees of warming by 2100, while current <em>policies</em> put us closer to 2.9C. It's too bad we won't live. But then again, who does?</p>
<p><img src="images/2021/dodos/patrols.png" style="width: 75%" title="AFRICAN ELEPHANT PATROLS ARE HELPING TO BRING THE IVORY TRADE UNDER CONTROL"></p>
<p>An international ban on the trade of ivory came into force in 1989, after <a href="https://eia-international.org/news/its-30-years-since-the-cites-global-ban-on-ivory-trade-and-the-fight-to-preserve-it-goes-on/">an exposé into the trade and the poaching of African elephants</a>. The <a href="https://theconversation.com/its-time-to-break-the-deadlock-over-africas-ivory-trade-heres-how-122153">topic is more complicated</a> than "ivory bad, therefore must be banned" - arguments have been made that legal, controlled ivory trade can be used to support elephant conservation efforts, and existing bans are undermined by ongoing illegal trade and (seemingly) widespread poaching. Unfortunately, from what I can gather the African elephant remains in decline. When the CITES ban came into effect in 1989, the population of African elephants was no more than 600,000 (down from twice that in 1979), and <a href="https://www.worldwildlife.org/magazine/issues/winter-2018/articles/the-status-of-african-elephants">in 2016 it was estimated at 352,000</a>.</p>
<p>On the upside, if elephants go extinct it brings us (humans) one step closer to being the largest, most important animal. Whales: we haven't forgotten you.</p>
<p><img src="images/2021/dodos/interdependence.png" style="width: 75%" title="GLOBAL EDUCATION ABOUT HOW WE ARE ALL INTER-DEPENDENT WILL ENSURE THAT OUR PLANET WILL BECOME A BETTER AND 'GREENER' PLACE IN WHICH TO LIVE">
When this game came out, the internet was functionally nonexistant. Social media wasn't even a distant nightmare. I grew up alongside the internet (I have been online for over two decades now, and I will never log off), so it's hard for me to even think of a non-internet world. I take it for granted that I can have friends in different countries, that I can learn about things happening around the world in near-real-time, and access information on essentially any topic.</p>
<p>I don't think this is sufficient for a proper internalisation of "interdependence", however. Late-capitalist society effectively separates us from knowing about other people and countries. Modern supply chains for goods are complex and opaque. You <em>may</em> be able to learn where something you're purchasing came from, but this knowledge is not designed into the system. Intermittent scandals about <a href="https://www.theguardian.com/commentisfree/2021/apr/09/cotton-slave-labor-uyghur-region-china">slave labour</a>, <a href="https://www.ft.com/content/c6909812-9ce4-11e9-9c06-a4640c9feebb">child labour</a>, <a href="https://www.nationalgeographic.com/environment/article/study-finds-seafood-mislabeled-illegal">label fraud</a>, and <a href="https://labourlist.org/2020/08/after-this-crisis-leicester-must-no-longer-be-known-as-the-sweatshop-of-europe/">sweatshops operating countries they're not expected in</a> underscore the reality that many people don't know much about how the things they own were produced. These details are not considered important to know.</p>
<p>Properly <em>understanding</em> the extent to which we are all interdependent requires more than being passively exposed to the internet at large. It necessitates (I think) more fundamental shifts in the emphasis of society. I don't know exactly what these would be, and I do <em>not</em> want to be misunderstood as having a romanticised version of a simpler past to which return is possible or desirable. But I do know that I want something that's better than this. So I choose to believe that the optimism of the game designers was well-placed, even if we haven't achieved ecotopia yet.</p>
<p>We have now come to the end of the positive cards. Many of the themes covered by the positive cards are also covered by the negative cards. I was going to write something snarky about this, but instead I quietly contemplated how often "wins" are really just avoided harms (less killing, less acid rain, more promises to avoid doing bad things). Is environmentalism a fundamentally <em>conservative</em> ideology? The answer, you may be surprised to hear, is "what does 'conservative' even mean? Let's agree on semantics before we have a discussion."</p>
<p><img src="images/2021/dodos/nucleardumping.png" style="width: 75%" title="NUCLEAR WASTE DUMPING IN THE SEA IS DESTROYING OCEAN LIFE"></p>
<p>As far as I can tell, dumping nuclear waste in the sea has been banned since 1993 (or maybe earlier, or later) by the London Convention (or maybe Protocol). More confusingly, the environmental impacts of nuclear waste dumping seem to be <a href="https://www.nationalgeographic.com/news/2011/4/110331-japan-radiation-health-mutations-nuclear-animals-ocean-science-world/">not very clear and hard to measure</a>. This is like the time (summer 2019) I wanted to learn about the impact of Chernobyl (original event, not 2019 HBO show) and found it killed between 60 and 60,000 people depending on methodology. This is not surprising given radiation has somewhat <em>diffuse</em> effects and causal inference is hard in general. Adding the literal diffusion of radioactive material in the ocean no doubt compounds the issue. In the absence of glowing barrels washing up on beaches to be picked over by three-eyed sea birds, I'm taking this one as a win! Thanks Dudley, you made us aware of our fragile environment.</p>
<p><img src="images/2021/dodos/nucleartesting.png" style="width: 75%" title="NUCLEAR WEAPONS TESTING HAS LEFT HUGE AREAS OF LAND UNINHABITABLE FOR ALL TYPES OF LIFE"></p>
<p>As per the above, determining the direct impacts of nuclear fallout is challenging, but we can look at some examples.</p>
<p>Bikini Atoll is an atoll (a ring-shaped coral reef) in the Marshall Islands that was used extensively for nuclear weapon testing by the US between 1946 and 1958. A 2008 study (Richards et al., Marine Pollution Bulletin) indicates that about 70% of previously-observed coral species can still be counted at the site:</p>
<blockquote>
<p>"The case of Bikini Atoll demonstrates that coral reef communities can recover from and exhibit resilience to major disturbance events. In this situation, the visible impact and recovery of the reefs from the anthropogenic impact of atomic testing can be compared to those following natural disturbance events such as cyclone/hurricane damage. Bikini Atoll’s reefs undoubtedly benefited from the post-testing absence of human disturbance, the presence of uninhabited and non-impacted neighbouring atolls,and a supportive prevailing hydrodynamic regime for larval import"</p>
</blockquote>
<p>The Semipalatinsk Test Site, aka "The Polygon", is a (shockingly large) region in Kazakhstan that the Soviet Union used for its nuclear weapons testing. Overground testing ended in 1963, with underground testing continuing until 1989. Overall about 400 Hiroshima's worth of nuclear weapons were tested at the site, with seemingly little regard for human health. <a href="https://www.nature.com/articles/d41586-019-01034-8">Here</a> is a Nature news feature on the health impacts on people living in the area. The USSR set up a nondescript medical centre in the region for monitoring radiation exposure, the data from which now serve as a valuable resource for understanding the impact of long-term low-dose radiation exposure on people, as well as their children. <a href="https://www.nationalgeographic.com/photography/article/nuclear-ghosts-kazakhstan">Here</a> are some photographs.</p>
<p>As an interesting aside, the <a href="https://pubs.er.usgs.gov/publication/70180952">US also tested some nuclear weapons at the Semipalatinsk Test Site</a> in the 90s, for the purpose of calibrating instruments for <em>detecting</em> nuclear weapons tests. I can feel myself sliding into a tangent about nuclear weapons and I am going to claw back to the matter at hand: unrelentingly depressing environmentalism.</p>
<p><img src="images/2021/dodos/ivory.png" style="width: 75%" title="THE IVORY TRADE HAS RESULTED IN THE WHOLESALE SLAUGHTER OF ELEPHANTS, WALRUSES AND RHINO'S"></p>
<p>There are five species of rhino. According to <a href="https://www.worldwildlife.org/pages/rhino-facts-and-species">the WWF</a>, there are "over 20,000" white rhinos left (although, if you consider just the northern white rhino sub-species there are exactly 2 individuals remaining from that species), around 5000 black rhinos, "more than 3,500" greater one-horned rhinos, around 80 Sumatran rhinos, and around 60 Javan rhinos. That's it for the rhino count. They mostly live in reserves or zoos because people are obsessed with killing them for their horns. It's not uncommon, to want to kill animals for their body parts. But "hunting to extinction" seems like a bad business strategy.</p>
<p>On the upside, walruses don't appear to be at any immediate risk of extinction due to poaching.</p>
<p><img src="images/2021/dodos/ozone.png" style="width: 75%" title="THE OZONE LAYER IS BEING DESTROYED BY CFC'S AND THE BURNING OF FOSSIL FUELS"></p>
<p>(see above) Not any more, mostly!</p>
<p><img src="images/2021/dodos/ddt.png" style="width: 75%" title="THE USE OF PESTICIDES, ESPECIALLY DDT, HAS GOT INTO THE SOIL AND ADVERSELY AFFECTED THE FOOD CHAINS"></p>
<p>DDT is one of those environmentalist things I hear mentioned a lot but don't specifically know much about, similar to glyphosate (except for <a href="https://www.youtube.com/watch?v=ovKw6YjqSfM">this incredible video</a> where Patrick Moore claims it's safe to drink before immediately refusing to drink it). DDT is an insecticide and a "persistent organic pollutant" (e.g. it does not degrade in the environment and will accumulate in organisms). This bioaccumulation makes it particularly nasty to apex predators, and apparently it was responsible for the near-extinction of the bald eagle in the USA. Its insecticidal powers makes it incredibly potent against malaria and typhus (both of which are spread by insects), and was seemingly used quite effectively to reduce or eradicate malaria in the US and parts of Europe.</p>
<p>DDT is famous I think in large part due to the seminal environmentalist book "Silent Spring" by Rachel Carson. I haven't read it because even the name of it makes me sad, but it seemingly kicked off a fairly widespread (in the US) movement against DDT, culminating in a 1972 ban on DDT for agricultural use. DDT is largely globally banned as of the 2004 Stockholm Convention on Persistent Organic Pollutants, but it's still used for vector control in some countries, albeit at declining rates. Continuing the trend of the bad cards being more optimistic than the good cards, DDT is mostly not a thing any more! I will not take further questions on persistent organic pollutants at this time.</p>
<p><img src="images/2021/dodos/acidrain.png" style="width: 75%" title="ACID RAIN PRODUCED BY ELECTRICAL GENERATING PLANTS RELEASING SULPHUR DIOXIDES INTO THE ATMOSPHERE IS RUINING WHOLE FORESTS"></p>
<p>See above re: "what happened to acid rain?". I went looking for an example of a forest ruined by acid rain, and I learned about the Black Triangle (distinct from the Polygon, which had an unspecified number of sides). The Black Triangle is a famously polluted region in the borderlands between Germany, Poland and Czechia. Up until 1989, the area was characterised by heavy industry powered by locally-strip-mined brown coal (the worst coal), as well as uranium mining, and concomitant environmental devastation and impact on human life. Allegedly since the dissolution of the USSR there has been an attempt to restore the area. However, the Turów Coal Mine (a large open pit lignite mine in this area) just got its licence renewed until 2026 (if not longer), so it's not clear how seriously everyone is taking this idea. On the upside, <a href="https://stopturow.com/en1.php">there are campaigns to stop this dreadful mine</a>.</p>
<p>An aside about brown coal: also known as lignite, this is some terrible-quality coal. It's got a relatively low carbon content, high moisture content, and high ash content. I'm not a coal scientist (although I may be by the time I finish this post), but all signs point to low quality product. Its heat content is low enough that you have to burn a lot to get any useful power out of it, it's hard to transport, and it's really bad for people. Lignite was also used extensively in East Germany for energy sovereingty, and Germany to this day remains its largest producer.</p>
<p>Musical interlude about (children) working in coal mines: <a href="https://www.youtube.com/watch?v=dm69TUoSCkw">School Day's Over - Luke Kelly</a>.</p>
<p><img src="images/2021/dodos/ecofascism.png" style="width: 75%" title="THE INCREASE IN THE WORLD POPULATION HAS RESULTED IN EXTRA PRESSURE ON FARMING AND OVER-FISHING"></p>
<p>The earth's population has risen by ~2.5 billion since 1989, now standing at around 7.7 billion. The rate of growth seemingly peaked in 1963 at 2.1%, and has been decreasing somewhat since then, now currently around 1%. Forecasts indicate that we might settle out at around 11 billion people by 2100, assuming things don't deteriorate rapidly (thunderdome-style) over the next century. There are many things to be said about population growth in the context of environmentalism, and I've started just <a href="https://theconversation.com/why-we-should-be-wary-of-blaming-overpopulation-for-the-climate-crisis-130709">linking to this article</a> when it comes up. It's not <em>not</em> an issue, but it's also not the main issue, and making it the focal point has a way of getting kinda racist real fast.</p>
<blockquote>
<p>"The problem is extreme inequality, the excessive consumption of the world’s ultra-rich, and a system that prioritises profits over social and ecological well-being. This is where where we should be devoting our attention".</p>
</blockquote>
<p>This isn't to say that farming and fishing <em>haven't</em> been under pressure. Looking just at meat: between 1989 and 2018, <a href="https://ourworldindata.org/meat-production">global meat production</a> went from 172.8 to 341.2 million tonnes per year. This includes 69 billion chickens, 1.5 billion pigs, and 300 million cows per year. This ~100% increase is disproportionate to the population increase (~50%). A lot of this is driven by China going from a country with relatively low meat consumption per capita to something approaching European countries. China's consumption was ~22kg/person/year in 1989, and was ~61kg/person/year in 2017. Compare this to the UK which went from ~72kg/person/year to ~80kg/person/year over the same period. Surprising to me, the US has a much higher per-capita meat consumption than the UK, at ~124kg/person/year in 2017. I'm happy to report that Ireland's meat consumption has <em>decreased</em> since I was born, from ~86kg/person/year to ~79kg/person/year. While it's easy to blame China for its increasing meat-lust, considering per-capita consumption is important for remembering who the <em>real</em> villains are: Australians.</p>
<p><img src="images/2021/dodos/rainforest.png" style="width: 75%" title="THE DESTRUCTION OF THE RAIN FOREST IS AIDING THE 'GREENHOUSE EFFECT' AND THREATENING MANY PLANTS AND ANIMALS WITH EXTINCTION"></p>
<p>and</p>
<p><img src="images/2021/dodos/farming.png" style="width: 75%" title="MAN'S USE OF LAND FOR FARMING OR DEVELOPMENT IS PUTTING MANY SPECIES OF PLANTS AND ANIMALS IN DANGER OF EXTINCTION"></p>
<p>These go together because, as I mentioned already, agriculture (specifically cattle) is the leading cause of deforestation.</p>
<p>Extinction is hard for me, so I put this last. I don't know how to deal with the fact that <a href="https://www.nhm.ac.uk/discover/news/2020/august/hedgehogs-and-water-voles-face-extinction.html">hedgehogs are now at risk of extinction in Britain</a> alongside water voles and red squirrels. I don't want to read about how <a href="https://www.theguardian.com/environment/2021/jan/22/quarter-of-known-bee-species-have-not-been-recorded-since-1990">a quarter of known bee species have not been sighted since 1990</a>, or how melting glaciers are <a href="https://theconversation.com/disappearing-glaciers-are-threatening-rare-alpine-plants-with-extinction-154135">driving Alpine plants to extinction</a>.</p>
<p>I distantly accept that extinction is a normal part of ecology and a necessary part of evolution. If nothing went extinct, the world would be teeming with goo or something (I don't know I'm not a biologist, leave me alone). But I still approach the thought of the dodo and the thylacine with a sense of grief. I look at the last photos of the thylacine as the last remaining fragments of a world we can never return to. Extinction to me, like death, is bound up with "never again". A door closing forever, a flame going out, something lost not to be found. Perhaps it is some immature refusal to accept the finiteness of life, a desire to run from endings and the loss of potential futures. I feel it when I think about an ancient forest being felled (you can't just grow that back!), or the (likely) loss of coral reefs, or the destruction of ancient cities and art, sacred sites, the loss of endangered languages. It is so much easier to destroy than to create. And humans are so, <em>so</em> good at destroying. The current rate of extinction is estimated to be 100-1000 times the "normal background" rate. We've built incredible technology to dredge the oceans and raze forests, to replace diversity with monoculture, to try to control nature, as if we were not ourselves part of it.</p>
<p><img src="images/2021/dodos/extinct.png" style="width: 75%" title="DODO'S ARE NOW EXTINCT DUE TO THE SELFISH ACTIONS OF MAN"></p>
<p>Gee, I wonder how I ended up like this.</p>
<p><img src="images/2021/dodos/save_the_world.png" style="width: 75%" title="Another game I found at my parents' house"></p>
<p><em>And now for a message of hope</em>:</p>
<p>Hopelessness is not an option. In the words of <a href="https://rebelsteps.com">Rebel Steps</a>:</p>
<blockquote>
<p>Believe in yourself, trust one another, and get organised.</p>
</blockquote>
<p>Good luck!</p>redesign2021-01-04T00:00:00+00:002021-01-04T00:00:00+00:00corcratag:None,2021-01-04:meta/2021-01-04-redesign.html<p>I have updated the design of the website! This started off as 'drop in a new Pelican theme and be done' and grew into a micro-project to do while confined to my parents house over Christmas (pandemic etc). I also watched lots of medium-to-terrible TV (GYNOTOPIA, SERIOUSLY?), which is a …</p><p>I have updated the design of the website! This started off as 'drop in a new Pelican theme and be done' and grew into a micro-project to do while confined to my parents house over Christmas (pandemic etc). I also watched lots of medium-to-terrible TV (GYNOTOPIA, SERIOUSLY?), which is a good accompaniment to making tiny tweaks in CSS and seeing what happens.</p>
<p>For posterity, the previous version of apeirotope looked like this:</p>
<p><img src="{filename}/images/2021/apeirotope_medius_index.png"></p>
<p>... which was an edited version of the <a href="https://github.com/onur/medius">medius theme</a>, which was designed to imitate Medium. Post example:</p>
<p><img src="{filename}/images/2021/apeirotope_medius_post.png"></p>
<p>The new version, also for posterity (the internet is a flimsy place for memories) looks like this:</p>
<p><img src="{filename}/images/2021/apeirotope_voce_index.png"></p>
<p>Post example:</p>
<p><img src="{filename}/images/2021/apeirotope_voce_post.png"></p>
<p>The new design is a modified version of the <a href="https://github.com/limbenjamin/voce">voce theme</a> - my fork is <a href="https://github.com/corcra/voce">here</a>. You can do a diff between my fork and the original one for the most comprehensive account of the edits I made, but I'll describe them in English here. Also, for comparison, here's what apeirotope would look like in mostly-plain voce:</p>
<p><img src="{filename}/images/2021/apeirotope_voce_index_original.png"></p>
<p>It's not really a fair comparison because the voce theme uses tags carefully and sparingly, whereas I use them freely, and instead use categories (which it doesn't really use) to categorise my posts. You can see a much better version of the voce theme on its <a href="https://limbenjamin.com/">creator's personal page</a>.</p>
<p>Particular edits I made: </p>
<ul>
<li>Obviously, get rid of the milieu of tags. I experimented with replacing them with my categories, but I didn't like the result. I settled with fully removing that section, and adding pages for Tags and Categories to the navigation bar.</li>
<li>Removing more elements, I got rid of the "logo" area and (not shown) the copyright stuff at the bottom. As far as I can tell from 10s of searching, those types of copyright declarations are mostly for scaring people off plagiarising your stuff, but aren't actually necessary to legally assert copyright. Following up with a further 20s of searching, I'd probably put a CC-BY-SA license on this site if I had to. I haven't had any legal issues in the 5 years or so I've had the website, so maybe copyright will be abolished soon and I won't need to think further about this.</li>
<li>It looks like I added an italic serif font, but he (Benjamin Lin, voce creator) seems to have done a nontrivial style update <em>four days ago</em>, which included removing it. This is funny to me because the previous update was in April, so I guess we were both spending part of our new years time editing the voce design. Hi Benjamin!</li>
<li>It's ideally not visible at all, but I ripped out a bunch of surveillance-flavoured internals, including: anything to do with google analytics, and (hopefully) all calls to external sources, including fonts, bootstrap CSS, etc. <a href="https://twitter.com/corcra/status/1342171321472573442">Webfonts are hosted locally for apeirotope</a>. Possibly didn't catch everything and maybe my website is slower now because a weak little OVH VPS is serving everything. My guess is that this site doesn't do enough traffic for that to be a real concern, but given the lack of analytics/me bothering to look at nginx logs ever, I have no idea.</li>
<li>Introducing my "colour-coding categories" nonsense (which I already had in medius, but required rejigging given the new templates in voce). This was probably the most complicated part because I <em>sort of</em> understand CSS, but not well enough to readily diagnose why certain styles are overriding each other. Concessions had to be made, but I am fairly happy with the result.</li>
<li>Directly edited minified bootstrap CSS to remove a weird navy colour that kept appearing in my unflavoured links. Numerous other minor style edits, including removing that (admittedly lovely) turquoise colour, and making things generally smaller.</li>
<li>The tags page sorts by number of posts, not alphabetically. Nobody should look at the tags page, though. I have a link-rot issue where I don't want to modify <em>categories</em> (since they define absolute paths to posts), but it's open season on tags and some day I may do a pass on de-duplicating them.</li>
<li>The archives page (new!) only segregates posts by month if there are more than 4 in a year. I am most proud of this edit because it required writing some Jinja, which first required learning the word "Jinja" so as to upgrade my search queries from "if statement pelican".</li>
</ul>
<p>In summary, this was NOT procrastination from generating other types of content for the website.</p>podcast review 20202020-11-29T00:00:00+00:002020-11-29T00:00:00+00:00corcratag:None,2020-11-29:tips/2020-11-29-podcasts-2020.html<p>One of the nice things about having your own website is that you can do whatever you want. Today I am going to recommend/describe some podcasts I listen to. I usually do this directly to whoever speaks to me after I find a new one, but now I can …</p><p>One of the nice things about having your own website is that you can do whatever you want. Today I am going to recommend/describe some podcasts I listen to. I usually do this directly to whoever speaks to me after I find a new one, but now I can do it to people on the internet too.</p>
<p>This will be more of a review than strictly a list of <em>recommendations</em>, so I'm not saying all of these are great. But I did listen to them.</p>
<p>Warning: some of these podcasts will try to sell you a mattress.</p>
<ul>
<li>
<p><a href="https://gimletmedia.com/shows/reply-all">Reply All</a> is probably the most generic podcast recommendation I could give. It's slickly produced, it's reliably entertaining, it has interesting trivia and moments of heart and touches on contemporary issues in a way which is not especially challenging. You sort of know what you're getting, even if you don't know what it'll be about. I have a strange memory of listening to the first few episodes of this when it started back in 2014 and being like "what is this podcast supposed to be about". Then I stopped listening for 5 years and I still don't entirely know. It's just about... stuff, you know? Stuff on the internet. Episode rec: <a href="https://gimletmedia.com/shows/reply-all/kwh23r/148-bedbugs-and-aliens">Bedbugs and Aliens</a></p>
</li>
<li>
<p><a href="https://99percentinvisible.org/">99% Invisible</a> is another reliable recommendation. The host (Roman Mars) has a strange and specific way of speaking which subtly aggravates me, but the content is really great. It's about "design", which is pretty broad - they talk about cities, infrastructure, architecture, objects, history, etc. The stories are interesting and hopefully mostly factual and the urbanism bias is very much up my alley. Episode rec: <a href="https://99percentinvisible.org/episode/palaces-for-the-people/">Palaces for the People</a> (spoiler: they are LIBRARIES)</p>
</li>
<li>
<p><a href="https://maximumfun.org/podcasts/adventure-zone/">The Adventure Zone</a> is a RPG podcast, which is a genre of podcast where you listen to people play role-playing games (with some editing). TAZ features known podcasters "the McElroy family", who seem to be lovely people and also very funny. I listened to TAZ Amnesty, which was a <a href="http://apocalypse-world.com/pbta/games/title/Monster_of_the_Week">Monster of the Week</a> campaign. They managed to blend an interesting world, heartfelt story, and absurd humour. I understand there to be many RPG podcasts out there, but I have mostly only listened to this one. Episode rec: <a href="https://maximumfun.org/episodes/adventure-zone/adventure-zone-amnesty-episode-1/">Episode 1 of Amnesty I guess</a>.</p>
</li>
<li>
<p><a href="https://www.parcast.com/mythology">Mythology (on the Parcast Network!)</a> is dramatisations of stories from mythology, in that they get voice actors to play out stories from mythology. I'm not mythology buff and suspect this is some entry-level mythology content. Please do not @ me with mythology-related screeds. It's light-weight story telling, although the reuse of voice actors gets a bit confusing if you listen for too long at once. The oddest thing about this podcast is how I get the feeling it's made by aliens who want to blend in, but who are too enthusiastic about mythology to pull it off. I will not elaborate on what I mean by this. Episode rec: The Abduction of Persephone.</p>
</li>
<li>
<p><a href="https://theconversation.com/uk/topics/the-anthill-podcast-27460">The Anthill</a> is a podcast from <a href="https://theconversation.com/">The Conversation</a>. Their sthick is getting academics directly to write articles (or be interviewed on a podcast) on topics of their expertise. The format seems to be multi-episode mini-series with long gaps, so it's not a "reliable weekly" sort of thing. Direct academic involvement means the quality of information should be pretty high, and they better not have lied to me. I've only listened to three of the mini-series (<a href="https://theconversation.com/india-tomorrow-part-1-fake-news-and-the-battle-for-information-113579">India Tomorrow</a>, <a href="https://theconversation.com/how-to-spot-a-conspiracy-theory-expert-guide-to-conspiracy-theories-part-one-133802">Conspiracy Theories</a>, <a href="https://theconversation.com/how-europe-recovered-from-the-black-death-recovery-podcast-series-part-one-139896">Recovery</a>) and they were all great.</p>
</li>
</ul>
<p>This concludes the list of <em>reasonably generic</em> podcasts I listen to. Now comes the more esoteric stuff, I guess.</p>
<ul>
<li>
<p><a href="https://lingthusiasm.com/">Lingthusiasm</a> is about linguistics. It's a podcast hosted by two linguists, talking about linguistics. The enthusiasm they have for linguistics is really charming. I don't listen to this one all the time because whenever I learn things about linguistics I forget things about computers, but it's another podcast where I will reliably come away having learned something. About linguistics. Episode rec: <a href="https://soundcloud.com/lingthusiasm/39-how-to-rebalance-a-lopsided-conversation">How to Rebalance a Lopsided Conversation</a> or <a href="https://soundcloud.com/lingthusiasm/12-sounds-you-cant-hear-babies-accents-and-phonemes">Sounds You Can't Hear</a>.</p>
</li>
<li>
<p><a href="https://www.criticalfrequency.org/drilled">Drilled</a> is a "True Crime Podcast about Climate Change". It focuses on fossil fuel propaganda and it's absolutely enraging. I actually stopped listening to it because I don't like making myself so simultaneously miserable and angry, but I did find it genuinely very informative. The second season (about crab fisherman) was a very different sort of climate story to what I'm used to. Overall, it's got that true crime investigative energy and it will make you want to burn Exxon to the ground.</p>
</li>
<li>
<p><a href="https://twitter.com/maintenancepod">Maintenance Phase</a> is about debunking wellness culture, health and weight-loss fads. It <em>just</em> started so I don't have a lot to go by, but the first few episodes have been strong. I find the discussion of dieting and diet culture very enlightening, because I'm a lucky person who eats whatever I want without thinking about it really. The hosts have something of a similar conversational style as Lingthusiasm, which is <em>very enthusiastic</em> in a way I feel is quite American, but neither of the hosts of Lingthusiasm are American, so that's on me and I need to think about that. Episode rec: <a href="https://open.spotify.com/episode/2PnFGxYEIgss1KISeICFHp?si=XIdHUSpPQ7Gk5_siyjXxLQ">Moon Juice</a>.</p>
</li>
<li>
<p><a href="https://thehistoryofrome.typepad.com/revolutions_podcast/">Revolutions</a> is my newest podcast addition and therefore the direct inspiration for this post. This is a history podcast about "great political revolutions" and has been a hard sell to my friends. I am shamefully ignorant of history and find myself going on occasional history splurges trying to catch up (I was really obsessed with World War 1 for a while after reading The Guns of August). It turns out that history is really interesting when it's told to you like a story, and not as a list of events to memorise. I've started right at the start of this podcast (in 2013) so am still learning about the English Civil War of 1642. I have good reason to believe there will be more revolutions to come.</p>
</li>
<li>
<p><a href="https://www.imaginaryworldspodcast.org/">Imaginary Worlds</a> is about sci-fi and fantasy, with a focus (ostensibly) on world-building. I think it's broader than that though, and the episodes often touch on wider issues relating to the media, or more fundamental ideas which are explored in sci-fi/fantasty. I only listen when I've read/seen the thing, so I don't listen to this one all that often. I do love imaginary worlds, though. Episode recs: <a href="https://www.imaginaryworldspodcast.org/episodes/the-power-of-the-makeover-mage">The Power of the Makeover Mage</a>.</p>
</li>
</ul>
<p>This concludes the list of <em>reasonably generic esoteric</em> podcasts I listen to. Now for the flagrantly political ones.</p>
<ul>
<li>
<p><a href="https://podcasts.apple.com/us/podcast/mass-for-shut-ins-the-gin-and-tacos-podcast/id1341525125?mt=2">Mass for Shut-ins</a> is the podcast version of <a href="http://www.ginandtacos.com/">Gin and Tacos</a>, a somewhat snarky political scientist who writes about American politics. I mostly view the podcast as the extension to his blog, which I've been reading on and off for many years now. I find what he has to say about the machinations of American politics interesting, e.g. <a href="https://podcasts.apple.com/us/podcast/minicast-c6-fdrs-court-packing-scheme-1937/id1341525125?i=1000492197345">FDR's Court Packing Scheme</a>.</p>
</li>
<li>
<p><a href="https://citationsneeded.libsyn.com/">Citations Needed</a> is about "the intersection of media, PR, and power". This is a very well-produced podcast that will consistently point out how something you thought was benign is actually bad. It's interesting in a depressing way as a result, although it can be validating to have your suspicions (that something you thought was benign is actually bad) confirmed by someone else. Examples include <a href="https://citationsneeded.libsyn.com/episode-116-the-pro-gentrification-aspirationalism-of-hgtvs-house-flipping-shows">The Pro-Gentrification Aspirationalism of HGTV's House-Flipping Shows</a> and <a href="https://citationsneeded.libsyn.com/episode-85-incitement-against-the-homeless-part-i-the-infestation-rhetoric-of-local-news">Incitement Against the Homeless (Part I) - The Infestation Rhetoric of Local News</a>. My enthusiasm for this podcast started to wane after I felt like it was making me hopelessly cynical, so I only listen intermittently now.</p>
</li>
<li>
<p><a href="https://www.currentaffairs.org/podcast">Current Affairs</a> is the podcast to accompany the magazine, of which I am also a subscriber. Current Affairs (both magazine and podcast) sit nicely in the intersection of serious leftist critique and frivolity. The typical podcast features some subset of the editors of CA talking about current events and more. My favourite segment is "Lefty Shark Tank", where someone proposes an absurd-sounding policy which will be judged by the others. Policies have included "Lower the voting age to zero", "Elected officials should have to wear burlap sacks", and other less memorable things that sound ridiculous but have surprising implications. It's difficult to select an episode to recommend as the panel episodes are basically miscellany and news, so take this Episode rec: <a href="https://currentaffairs.simplecast.com/episodes/48-an-analysis-of-birds-large-and-small">An Analysis of Birds, Large and Small</a>, or this horrifying/slightly inspiring one where two of the lawyers on the CA team talk about their work: <a href="https://currentaffairs.simplecast.com/episodes/immigration-update-detention-and-covid">Immigration Update: Detention and COVID</a>. Not sure why CA has so many lawyers.</p>
</li>
<li>
<p><a href="https://workingclasshistory.com/podcast/">Working Class History</a> is a history podcast, focusing on the role of normal (=working class) people in history. I got into it via a crossover they did with <a href="https://workingclasshistory.com/2020/05/26/e38-mutiny-with-srsly-wrong/">Srsly Wrong on mutinies</a>. I find this podcast can be a bit dry or slightly more taxing to listen to than some of the other more podcasts, so need to be in an attentive mood, but the subject matter is generally fascinating. Slightly esoteric subject matter means even people who know more history than me will probably learn something, but you must understand I'm really starting with nothing here, August 1914 notwithstanding. Episode rec: <a href="https://workingclasshistory.com/2019/04/09/wch-crime-columbia-eagle-mutiny/">miniseries on the Columbia Eagle Mutiny</a>, or <a href="https://workingclasshistory.com/2020/02/17/e35-37-the-43-group/">miniseries on The 43 Group</a> if you're less interested in mutinies than I am.</p>
</li>
<li>
<p><a href="http://generalintellectunit.net/">General Intellect Unit</a> looks at the intersection of technology and left politics. I only got onto this one recently but suspect I will have many thoughts on it in future (given I am a Tech). They're quite interested in cybernetics and a bunch of the episodes are essentially summaries of the main ideas of Stafford Beer, e.g. <a href="http://generalintellectunit.net/e/031-designing-freedom/">Designing Freedom</a>, but they also cover the contents of related books, like <a href="http://generalintellectunit.net/e/008-red-plenty-part-1/">Red Plenty</a>, or sci-fi I already like, like <a href="http://generalintellectunit.net/e/017-the-dispossessed-with-fraser-simons/">The Dispossesed</a>.</p>
</li>
<li>
<p><a href="https://soundcloud.com/therednationpod">The Red Nation Podcast</a> is about "Indigenous history, politics and culture from a left perspective". As an Irish person living in England, this podcast is like a dispatch from a totally different world, but it's a welcome change from the typical US-based perspectives. There's a bit of an academic energy to it at times, but mostly I find it interesting to hear what Indigenous people are saying about current and historical events. Episode rec: <a href="https://soundcloud.com/therednationpod/the-fourth-of-you-lie-w-dallas">The Fourth of You-Lie</a>.</p>
</li>
<li>
<p><a href="https://blubrry.com/wdtatw/">We Don't Talk About the Weather</a> is a podcast I found while trying to get away from American podcasts (sorry, rest of list). WDTATW is two London-based guys talking about current affairs, mostly in the UK. The podcast aptly self-describes itself as "sounding like screaming and crying", which captures some of the spirit if not the actual energy levels of the podcast. I mostly use this as a palette cleanser from all the US-based takes beaming into my brain 23 hours a day, especially if something has happened in the UK that needs analysing. Unfortunately something has always just happened in the UK that needs analysing, and it's usually terrible. I feel obligated to be at least somewhat informed about the politics of the country I live in, so here we are. "Boris Johnson is a pagan" comes up more often than I think is normal. Episode rec is a bit hard but take <a href="https://blubrry.com/wdtatw/59775210/episode-119-i-cant-believe-i-forgot-5g/">I Can't Believe I "Forgot" 5G</a>.</p>
</li>
<li>
<p><a href="https://trashfuturepodcast.podbean.com/">Trashfuture</a> is one I don't really listen to any more but want to include as part of the "Leftist Podcasts from the UK" genre, in case someone else likes it. It's a bunch of people discussing and making jokes about current events and politics. I stopped listening to it because it's too snarky and chaotic for me (people interrupting each other, etc), but if you like Spicy Takes and Internet Leftist Memes or whatever, you might like this. I will admit to enjoying the parts where they make fun of weird startups, though. Episode rec: <a href="https://trashfuturepodcast.podbean.com/e/mit-media-lab-after-dark-part-3-we-just-make-boxes-here-feat-sarah-taber/">MIT Media Lab After Dark Part 3: We Just Make Boxes here feat. Sarah Taber</a>.</p>
</li>
<li>
<p><a href="https://srslywrong.com/">Srsly Wrong</a> is a "utopian leftist comedy podcast", and it's my favourite podcast. The first time I listened to it I couldn't figure out what was going on because the format is "mostly serious discussion of ideas interspersed with bizarre sketch comedy". What I really like about this podcast is more the underlying ideology espoused by the hosts rather than the format of the podcast itself (contrast this to Reply All, where the content is somewhat irrelevant but the experience of listening to the podcast is generally pleasant), although I also greatly enjoy the bizarre sketch comedy. I will write more about different ideas from this show, or some steps removed from this show, in due time. Discovering this podcast probably made my 2020. Episode recs: <a href="https://srslywrong.com/podcast/189-library-socialism-usufruct/">Library Socialism and Usufruct</a>, <a href="https://srslywrong.com/podcast/217-trash/">Trash!</a>.</p>
</li>
</ul>
<p>This has been a non-exhaustive list of podcasts I have listened to in 2020. If you have suggestions for other podcasts you think I might enjoy, please let me know using normal communication channels.</p>
<p>According to my podcast app (<a href="https://www.pocketcasts.com/">Pocket Casts</a>), I have spent 19 days and 21 hours listening to podcasts since November 2018, which is about 477 hours. Is that a large number? Compared to the amount of time I have spent playing Dota 2, the answer is no.</p>new site for research2020-11-05T00:00:00+00:002020-11-05T00:00:00+00:00corcratag:None,2020-11-05:meta/2020-11-05-new-site.html<p>I made this tweet several months ago:
<a href="https://twitter.com/_hylandSL/status/1269620384908836865"><img src="images/2020/research_website.png"></a></p>
<p><em>(This website is now an elaborate mechanism for me to retweet myself.)</em></p>
<p>In theory apeiroto.pe counts as a personal research page, but it's not of the "glorified CV" variety I was thinking about when I wrote the tweet.
When I started apeiroto …</p><p>I made this tweet several months ago:
<a href="https://twitter.com/_hylandSL/status/1269620384908836865"><img src="images/2020/research_website.png"></a></p>
<p><em>(This website is now an elaborate mechanism for me to retweet myself.)</em></p>
<p>In theory apeiroto.pe counts as a personal research page, but it's not of the "glorified CV" variety I was thinking about when I wrote the tweet.
When I started apeiroto.pe I liked the idea of being unashamedly <em>multifaceted</em> (<a href="https://en.wikipedia.org/wiki/Apeirotope">get it?</a>), and I still do. But for the sake of those people who are only interseted in the facets of me which pertain to research, <strong>I've created a dedicated research-facing website: <a href="https://sthy.land">sthy.land</a>.</strong></p>
<p>It's very sparse, and I don't 100% love the theme (it is of course also using Pelican), but it's good enough for now. Correspondingly, the "research" page on apeiroto.pe will link there from now on.</p>
<p>This sort of post is usually accompanied by a promise to update more often. I refuse to make such a promise.</p>setting up mastodon with hometown2020-05-07T00:00:00+01:002020-05-07T00:00:00+01:00corcratag:None,2020-05-07:tips/2020-05-07-leafytown.html<p>This is a 'how to do something' sort of blog post, I might write about why later. The something is running a social network for my friends.</p>
<p>The starting point is probably <a href="https://runyourown.social/">run your own social</a>, which covers a lot of the 'why' and some of the 'what'. Chances are …</p><p>This is a 'how to do something' sort of blog post, I might write about why later. The something is running a social network for my friends.</p>
<p>The starting point is probably <a href="https://runyourown.social/">run your own social</a>, which covers a lot of the 'why' and some of the 'what'. Chances are if you are reading this post you already know about it, but if not it's a good read and probably a prerequisite for caring about the rest of this post.</p>
<p>In case it wasn't apparent from this website, I like running my own things. I decided that lockdown (<em>metadata: it has been approximately 55 days since I had a face-to-face conversation with someone I know</em>) would be a good opportunity to find new ways of interacting with my friends. Maybe that's getting too far into the why, though. I grabbed another VPS (total VPS count: 3) and decided to set up a <a href="https://docs.joinmastodon.org/">mastodon</a> server running the <a href="https://github.com/hometown-fork/hometown">hometown</a> fork.</p>
<p>The basic gist of running mastodon with hometown is to follow two sets of instructions:</p>
<ul>
<li><a href="https://docs.joinmastodon.org/admin/prerequisites/">the mastodon server installation guide</a></li>
<li><a href="https://github.com/hometown-fork/hometown/wiki/Initial-migration">the migrating from mastodon to hometown doc</a></li>
</ul>
<p>This is basically comprehensive but I still messed it up the first time, so in this post I will walk through the steps with some inane recipe-tier flavour-text on the side.
Also, the hometown migration doc warns that it's not for beginners, so maybe I can help pseudo-beginners? Semi-nerds like myself still deserve autonomous social networks.</p>
<h3>Step 1: Procure a server</h3>
<p>My existing VPSes are with <a href="https://www.heficed.com/">Heficed</a>, which I knew as Host1Plus. I originally got a VPS with them many years ago because I wanted to run a Tor exit out of an African country, and they had a data centre in Johannesburg and didn't seem to care about the Tor exit thing.</p>
<p>For reasons I price I opted for <a href="https://www.ovh.co.uk/">OVH</a> this time. In case it's useful, my VPS has 8GB of RAM and 160 GB of storage, and is running Ubuntu 18.04 (this is the recommended OS from the Mastodon guide). I put it in a London data centre, maybe one day I can visit it.</p>
<p>Full disclosure: I initally only paid for one month of the VPS, then ignored 2 weeks worth of warning emails, and everything from I T E R A T I O N 1 got wiped. There was nothing I could do, in such an unprecedented time. In the current iteration I've paid for a year up front. This isn't immensely cheap (it cost about 200 pounds), but I'm one of the lucky ones right now because I have a job. Maybe if it takes off I'll ask for donations from the users.</p>
<h3>Step 2: Install Mastodon version 2.9.3</h3>
<p>This is where we approximately follow the <a href="https://docs.joinmastodon.org/admin/prerequisites/">mastodon installation instructions</a>, but make sure to end up with version 2.9.3 installed. This is (at time of writing) necessary for the subsequent hometown migration*. <em>update from 30 minutes after I wrote that: the hometown wiki looks a bit out of date, there are versions of hometown that are aligned with recent versions of Mastodon e.g. <a href="https://github.com/hometown-fork/hometown/releases/tag/v1.0.3%2B3.1.2">v3.1.2</a>, but I don't want to rewrite this entire blog post so ???</em></p>
<p>This was the hardest part because you have to deviate slightly from the provided instructions. I'm assuming you're looking at them (time of writing: 7th May 2020) and basically following along, so I don't have to reproduce all the steps here. By the time that page is out of date, this one will be too.</p>
<p><a href="https://docs.joinmastodon.org/admin/prerequisites/">Preparing the machine</a> is all fine.</p>
<p><a href="https://docs.joinmastodon.org/admin/install/">Installing from source</a> is fine <em>until</em> it comes to installing Ruby.
They recommend this:</p>
<div class="highlight"><pre><span></span>> RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install 2.6.6
> rbenv global 2.6.6
</pre></div>
<p>This version of Ruby is too new! I went for version 2.6.1. I don't remember how I figured out this version would work, a dream maybe?</p>
<p>Postgres installation instructions are all fine. Be careful if you already have the remnants of failed installations lying around (who would have that?!) with misleading table names. In a way, losing everything to the big VPS wipe was a gift.</p>
<p>Vigilance is once again required while checking out the Mastodon codebase. They tell you to do this:</p>
<div class="highlight"><pre><span></span>git clone https://github.com/tootsuite/mastodon.git live && cd live
git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)
</pre></div>
<p>That second line is trying to check out the most recent version of Mastodon, and we're not here for that. I cheated by taking the commit hash for v2.9.3 from the Hometown instructions, which is gonna give us this instead:</p>
<div class="highlight"><pre><span></span>git clone https://github.com/tootsuite/mastodon.git live && cd live
git checkout 06f906acace5770fc10f333a203b036c5b72c849
</pre></div>
<p>You can sanity-check this has produced the correct version with</p>
<div class="highlight"><pre><span></span>git describe --tags
</pre></div>
<p>where it will dutifully give you <code>v2.9.3</code>, probably.</p>
<p>The rest of the Mastodon instructions are basically as-is. </p>
<p>Before you do the interactive setup wizard</p>
<div class="highlight"><pre><span></span>RAILS_ENV=production bundle exec rake mastodon:setup
</pre></div>
<p>you should probably do step 1.5, though.</p>
<h3>Step 1.5: Get a domain and mail server</h3>
<p>The Mastodon server running on the VPS needs some way of being known to the outside world, and domain names are a recent technology purporting to improve on the otherwise-flawless system of memorising ipv4 addresses.</p>
<p>I use <a href="https://www.namecheap.com/">Namecheap</a> for my domains (including apeiroto.pe and my Mastodon server). The basic idea is you rent a domain from them, because they're internet landlords I guess. Once you own your domain you can update its A Record (for me this is in the domain management page) to include the IP address of your VPS.</p>
<p>I'm including 'get a mail server' in here because I did that with Namecheap as well. I briefly considered running my own mail server on the VPS, but I'm not at that level of running my own things. Not yet.
During the mastodon setup wizard it will ask for various details of your mail server, which should be available from whatever provider you go with (e.g SMTP address, username and password and such). I'm like 30% sure the way I set this up has left it open to harvesting by spambots, so I'm not going to give any further advice in case the spambots find me.</p>
<p>The reason you are giving it an email address is so it can send things like Forgot Password? emails to your users.</p>
<h3>Step 2.05: Finish step 2 and then check</h3>
<p>Before proceeding, go to your new domain in the browser and check that:</p>
<ul>
<li>mastodon is working</li>
<li>mastodon is version 2.9.3 (near the bottom of the page)</li>
</ul>
<p>You could stop here and be content with your Mastodon server running a slightly out of date version of Mastodon. You could be happy.</p>
<h3>Step 3: Migrate to hometown</h3>
<p>Now we refer back to <a href="https://github.com/hometown-fork/hometown/wiki/Initial-migration">the hometown wiki page on migrating from mastodon</a> mentioned before.</p>
<p>Because we ensured to install version 2.9.3 before, this should mostly Just Work.
The only slightly odd thing for me was getting this error:</p>
<div class="highlight"><pre><span></span>> git fetch --tags
> git merge v1.0.1+2.9.3
merge: v1.0.1+2.9.3 - not something we can merge
</pre></div>
<p>This might be some git config issue but changing to</p>
<div class="highlight"><pre><span></span>git fetch --tags -all
</pre></div>
<p>and then merging as described fixed it.</p>
<p>Following the rest of instructions as they are should result in your Mastodon server now including a mention of hometown at the bottom, indicating that it works. </p>
<h3>Step 4 (optional): Make local-only posting default</h3>
<p>For me, the reason to use hometown was that sweet local-only posting, but it's still possible for users to post publicly. Following all the above steps, it ended up that public (or <em>federated</em> to be more specific) posting was the default. Having to toggle local-only on every tweet (I refuse to say toot because it sounds stupid as hell) was a pain and could easily result in accidental public posts. Thus began a saga of trying to figure out how to change this behaviour.</p>
<p>I don't know much Javascript and I know even less Ruby, so after some fruitless attempts to reverse-engineer the codebase I got some friends involved, who are faster at reverse-engineering and who did not repeatedly pause their progress with games of starcraft 2. Eventually (like, four hours later) Paddy realised that this is just an option you can set in a config file:</p>
<p><a href="https://github.com/hometown-fork/hometown/blob/hometown-dev/config/settings.yml#L20">here is the line</a></p>
<p>In case of link rot, this is the <code>settings.yml</code> file in the <code>config</code> subfolder of the repository. The config option is <code>default_federation</code>, and you want it to be <code>false</code> for local-only to be default. I'm looking forward to discovering what the other options do.</p>
<h3>Step 5: Give back to community</h3>
<p><em>... by using acquired wisdom to update their documentation (maybe)</em></p>
<p>While double-checking things for this post I realised that the hometown installation document seems to be out of date.</p>
<p>Remember how we painstakingly made sure we had v2.9.3 of Mastodon installed, so we could use hometown? It looks like there's already <a href="https://github.com/hometown-fork/hometown/releases/tag/v1.0.3%2B3.1.2">hometown v1.0.3 for mastodon v3.1.2</a> so that was actually unnecessary and we could have just installed whatever Mastodon version we wanted. Anyway I hope you enjoyed this blog post, I'm going to go mass queens <a href="https://starcraft2.com/en-gb/news/23405326">before they get nerfed</a>.</p>the urgency of slowness2019-05-19T00:00:00+01:002019-05-19T00:00:00+01:00corcratag:None,2019-05-19:life/2019-05-19-the-urgency-of-slowness.html<p>My parents are not originally from Dublin. My father came to Ireland from Chile in the 70s, and my mother came from Wicklow a bit later. In both cases the rest of their family stayed behind for the most part, so visiting family has always meant travelling. My family regularly …</p><p>My parents are not originally from Dublin. My father came to Ireland from Chile in the 70s, and my mother came from Wicklow a bit later. In both cases the rest of their family stayed behind for the most part, so visiting family has always meant travelling. My family regularly made the 18-odd hour journey from Dublin to Santiago during my youth. I've since learned that regular transcontinental travel is not the norm, and you don't get free food on short-haul flights.</p>
<p>Driving down to Wicklow we used to pass through the Glen of the Downs. In the Glen, environmental and political activists demonstrated in the forest and painted messages on the wall overlooking the valley. I grew up wanting to be an eco-warrior like them. I wanted to live in a tree in the hills, with a valley to protect. Along the way I forgot about living in a tree and I got caught up in normal life, a life lived safely within the boundaries of social acceptability. Only once have I appeared on television during a protest about anything. In the light of the (semi-)recent IPCC report about the increasingly catastrophic outlook for the planet's climate, I wonder if I and others like me will be looked back at with scorn. Scorn for our inaction, our unwillingness to sacrifice anything, our complacency in the face of unfolding disaster.</p>
<p>I try not to be complacent. In the calculus of personal responsibility for climate change, I think I fare better than others in my situation. I'm going on 8 and a half years of vegetarianism. I don't drive: I don't actually know how to drive. Privileged as I am to live in cities, I cycle, walk, or take public transport everywhere. I donate to environmental charities. I don't buy new things very often, I avoid plastic. Every time I brush my teeth, every time I wash dishes, I think about water conservation. I don't leave the light on. I hang my clothes out to dry. But I am still a (north-western) European, and I'm well-off. The comforts of my life come at a premium that I will barely have to pay. I take warm showers, I enjoy continuous electricity and high-end consumer devices. And I fly. A lot.</p>
<p>In June of 2013, I thought of myself as well-travelled. I had been to Chile countless times; once to Easter Island, and another time to the Atacama desert. I had been to California and Florida, Turkey and Vietnam. When I decided to move to the USA for a PhD I knew it was a more serious kind of emigration than moving to England had been. But at the time I had not deeply thought about being a scientist as well as an emigrant. Between conference travel and visiting home and family in Europe, over those 5.4 years my propensity for air travel increased precipitously. I started writing this en route to South Africa in January 2019 (it's been in the outbox for a while). Between November 2018 and February 2019 I will have been in Zurich (home), San Francisco, New York, Montreal (via Geneva), Dublin (other home), London, Cape Town (via Johannesburg, Paris, George, and Amsterdam), and Mexico City. That's four transcontinental trips in as many months. This would have been unthinkable to a teenage version of myself. One acclimates quickly.</p>
<p>The problem is that flying is very convenient. Flying is unbelievably fast. Flying allows you to convert money into time, in what is so obviously an excellent trade that anyone with the means would surely be foolish to turn it down. This speed opens up the possibility of spending the weekend in another country and returning for work as usual on Monday. Going to the other side of the planet becomes inconvenient only because 12 hours on a plane can become uncomfortable. The entertainment system might stop working, the crying of a child may interrupt already fitful sleep at 35,000 feet, and the food may be bland or unrecognisable. The idea that air travel is damaging in some abstract way to the environment does not practically feature into the considerations one makes around time, money, layovers, legroom, screaming children, discarded water bottles, city views, packing. There is a sense that flying might be contributing somehow to climate change, but for an extra 10 euro you can offset your carbon, and climate change is sort of not obviously happening right now, and there's still some time left, and anyway it's those top 100 companies that are really causing it, so it's probably fine. You move on to seat selection: windows are good for long trips because you can lean against the wall, but what if you want to go to the bathroom?</p>
<p>And so it goes.</p>
<p>In the winter of 2018 I finally got to take the "Adirondack" between Montreal and New York. This is a passenger train route which travels through the Hudson valley and the Adirondack mountains, and it takes about 11 hours end to end. I had previously thought about it in 2015 when I was still living in New York and Montreal was hosting a popular conference in my field. In the end I decided I couldn't afford to add two days of travel to the trip, even if those days could be spent preparing for the conference. I figured any such train-based preparation would be inferior to what I could do from my office, so the most efficient solution would be to minimise travel time. Besides, the money wasn't mine, and everyone else was flying. In December 2018 the conference came back to Montreal, and my PhD defense required me to return to New York, so I killed two non-metaphorical endangered species with one stone and made the transatlantic trip. This time, when the opportunity arose, I took the train.</p>
<p>I'm not a stranger to long rail journeys. Like many middle-class Europeans, I spent one intense summer travelling our small continent on trains of varying speed and quality. These at-times ten-hour journeys were spent eating illicit sandwiches smuggled from hostel breakfasts, debating still-intractable philosophical positions, and otherwise smoothly blurring into the rest of the trip. So I was not worried - I knew I could entertain myself, even without friends on hand to practice Hungarian with. We left Montreal at 10am and arrived in New York's Penn station after 9pm. Over eleven hours I watched the landscape change almost imperceptibly slowly. The urban area of Montreal slipped away as the snow receded. Frozen lakes cracked and melted, and bare trees gave way to the distant brown-green valleys of Vermont. I saw tree swings and tree houses and a pair of wooden chairs on a hill overlooking the river. I thought about life in these places. I speculated. After five years under the abstract sense of panic I attribute to doing a PhD, I basked in the luxury of time. For eleven hours, I didn't really do anything. I didn't try to pass the time, nor did I clamour to use it. I sat, mostly, gazing out the window as the sun moved across the sky.</p>
<p>Choosing to fly is a complex decision. Due to economic and political forces I have yet to understand, it's often the cheaper option, and not everyone has the same abundance of time as an academic who just finished her PhD, nor the same willingness to spend ten hours looking at variations on wintry landscapes. I can't ask people to stop flying, I wouldn't even ask it of myself. But I have come to realise that the idea that flying turns money into time is an elaborate self-deception. You can't buy time. You can only (if you are lucky) choose how to spend it. Spending it in paradoxically-monotonous bursts of speed seems to be the default choice for anyone with the money and the inclination. It was for me, but I'm done. I'm done with priding myself on my tolerance for complicated itineraries, I'm done with "at least you can watch movies!", with habitually storing my toiletries in a plastic bag. I'm done with finding the view above the clouds unremarkable. I'm done with the urgency of flying, the devaluation of time spent doing little. I'm done with a culture of treating environmental issues as sources of guilt and little else, a carbon offset to be purchased, and a hope that everything will get better by someone else's hand. Moving slowly might not save the world, but at least I'll see the trees while they last.</p>yes, but did it work? evaluating variational inference2018-06-03T00:00:00+01:002018-06-03T00:00:00+01:00corcratag:None,2018-06-03:ml/2018-06-03-yes-but-did-it-work-vi.html<p>This post is about the paper <a href="https://arxiv.org/abs/1802.02538">Yes, but Did It Work?: Evaluating Variational Inference</a> by <em>Yuling Yao, Aki Vehtari, Daniel Simpson, Andrew Gelman</em>, which will appear at ICML 2018. I'm going to try to summarise/explain the paper in my own words, largely for my own benefit. I'm also going …</p><p>This post is about the paper <a href="https://arxiv.org/abs/1802.02538">Yes, but Did It Work?: Evaluating Variational Inference</a> by <em>Yuling Yao, Aki Vehtari, Daniel Simpson, Andrew Gelman</em>, which will appear at ICML 2018. I'm going to try to summarise/explain the paper in my own words, largely for my own benefit. I'm also going to do this without writing any mathematical formulae, because I don't remember how to do LaTeX with my website, and I don't feel like shaving that particular yak right now.</p>
<p>After the accepted ICML papers were announced, I went through it hunting for relevant work. I've decided it's a better use of my time to read papers that have been accepted somewhere, rather than drowning under the firehouse of my arXiv RSS feed. This paper ticked two boxes: variational inference, and knowing if it worked. It also ticked a third, secret box of "titles that make it sound like the paper will have been written in a casual, conversational style, eschewing the tradition of appearing smarter by obfuscating the point".</p>
<p>Single-line summary: <strong>they describe two diagnostics for evaluating the variational posterior, with different properties and use-cases</strong>.</p>
<p>So let's talk about these two diagnostics.</p>
<h3>Pareto Smoothed Importance Sampling (PSIS)</h3>
<p>At this point I realised the auther overlap between this paper and <a href="https://arxiv.org/abs/1507.04544">Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC</a>, which in turn builds on <a href="https://arxiv.org/abs/1507.02646">Pareto Smoothed Importance Sampling</a>.</p>
<p>So what is PSIS and how is it useful for evaluating VI?</p>
<p>Importance sampling is a technique which enables us to estimate expectations under a distribution which is difficult to sample from (the target distribution), using an approximating <em>proposal distribution</em>. You sample from your proposal distribution (which is easy to sample from), then <em>weight</em> those samples by the ratio of target distribution to the proposal distribution (evaluated at the sample point). These weights are called importance ratios.</p>
<p>Pareto smoothing comes in because in the event that the proposal distribution is a poor fit to the target distribution, these weights can have a very high variance. The proposal distribution is the denominator in the importance ratio, so if you imagine that this distribution is a lot thinner than the target distribution - that is, it's near zero in regions where the target distribution is not, you can end up with some very large importance ratios - high variance. This means that you would need a <em>lot</em> of samples to estimate the expectation value of interest. Pareto smoothing is a way to control this variance. It builds on the idea of simply truncating the importance ratios (<a href="https://experts.umich.edu/en/publications/truncated-importance-sampling">Truncated Importance Sampling, Ionides 2008</a>) by instead fitting a Pareto distribution to them.</p>
<p><em>Side note: Part of the motivation of using the Pareto distribution at this point, I think, is to use its fitted parameters to do</em> diagnostics <em>on the proposal distribution. This is exactly what "Yes, But Did It Work?" is doing, but they already talk about it in the original PSIS paper, so I guess part of the novelty of this ICML paper is bringing it explicitly to the VI area. More about VI when I'm done with this Pareto stuff.</em></p>
<p>So how does fitting a Pareto distribution to the importance ratios help? In practice, you fit the Pareto distribution, and then instead of simply <em>truncating</em> the top M importance ratios (M is chosen empirically/arbitrarily) you <em>replace</em> them using the inverse cumulative density function of the Pareto distribution you fit. This replacement operates on the ranks of these importance ratios (so the smallest of the M, the second-smallest and so on), replacing those with what you'd get in a Pareto distribution ranked by CDF. This reminds me of rank-based inverse-normal transformations I've seen used in genetics (weirdly difficult to find papers about this, <a href="https://cran.r-project.org/web/packages/RNOmni/vignettes/RNOmni.html">here</a> is an R vignette). They argue that this produces an IS estimate that is less biased than what you get using truncated IS. Moreover, you can inspect the parameters of the fitted Pareto distribution to do diagnostics.</p>
<p>The reason they use a <em>Pareto</em> distribution to model the top M importance ratios is because It Is Known. Rather, it is shown in <a href="https://projecteuclid.org/download/pdf_1/euclid.aos/1176343003">Pickands, 1975</a> to be an appropriate choice. To be specific, they use a <em>generalised</em> Pareto distribution. This distribution has three parameters (location, scale, shape), and it has the property that it has finite moments up to order 1/k, where k is the shape parameter. That means that if k > 0.5, the variance of the importance ratios is infinite, but if k < 1 at least the mean exists. They point to 0.5 < k < 0.7 as a regime where the importance sampling procedure exhibits a practicaly useful convergence rate.
Side note: I don't quite see where the jump from modelling the variance of the <em>tail</em> of the importance ratios to modelling <em>all</em> the importance ratios happened. I suppose if you observe that your tail has a finite variance, then you must have finite variance in the rest of the values, but I would have expected an additional step to extend the conclusions made about the fit of the Pareto distribution to the rest of the importance ratios.</p>
<p>Now, relating this back to variational inference is straight forward: replace "target distribution" with "variational posterior". PSIS, via the shape parameter of the fitted Pareto distribution, gives us a diagnostic for how well the variational posterior fits with the true posterior.</p>
<p>But wait... don't we need the true posterior to calculate the importance ratios? Isn't this circular? The answer is that you can use the <em>joint</em> distribution (p(z, x) rather than p(z|x)) because the estimate of k is invariant to a constant multiplicative factor, which will be p(x).</p>
<p>The diagnostic approach is thus:</p>
<ol>
<li>Run VI, get variational distribution q(z) approximating p(z|x).</li>
<li>Sample a bunch of zs from q(z)</li>
<li>Calculate p(z, x) for all the zs (remember, x is known - it is a specific dataset), and get the importance ratios p(z, x)/q(z)</li>
<li>Fit a generalised Pareto distribution to the largest M importance ratios</li>
<li>Report the (estimated) shape parameter k</li>
<li>If k > 0.7, the VI approximation is not reliable</li>
<li>If k < 0.5, the VI approximation is good, and PSIS can additionally be used to calculate further divergence measures</li>
</ol>
<p>They touch on two other points in this paper, regarding PSIS:</p>
<ol>
<li>The shape parameter k is invariant under reparametrisation, but reparametrisation can influence the VI procedure and produce better/worse proposal distributions. So looking at k can help guide reparametrisation efforts</li>
<li>Marginal PSIS diagnostics are not useful. These marginal diagnostics would be doing the above procedure, but instead of sampling full zs, sampling only 1 dimension at a time. Compared to PSIS diagnostic evaluated from the joint distribution, these marginal ks are never larger (usually smaller) than k, and can be misleading. Also, this means you need access to the marginal distribution p(z_i, x) (or p(z_i | x)) to get the importance ratios, which may be unavailable. So don't do it.</li>
</ol>
<h3>Variational Simulation-Based Calibration Diagnostic (VSBC)</h3>
<p>The PSIS diagnostic looks at the <em>full</em> approximate posterior. However, sometimes you don't need to properly approximate the full posterior, and can get away with producing useful point estimates. VSBC evaluates the quality of point estimates. It is based on <a href="http://www.stat.columbia.edu/~gelman/research/published/Cook_Software_Validation.pdf">Validation of Software for Bayesian Models Using Posterior Quantiles</a> (Cook, 2006).</p>
<p>The key observation from (Cook et al., 2006) is going to be fun to explain with no proper equations. Let's try: suppose we have access to p(z), p(x|z) and p(z|x) (this will be approximated by p(z) shortly). We simulate an x by first sampling from z, then p(x|z). Now, we then sample multiple z's from p(z|x). We can ask what fraction of those sampled z's are smaller than the original z - we call this the calibration probability. Now, if we were to do this multiple times (picking a z, then x, then multiple resampled z's) we would get a distribution of calibration probabilities. And that should be uniform. I <em>think</em> this is Cook's observation.</p>
<p>So to relate this to VI, we can perform the above procedure, replacing the true posterior p(z|x) with the approximate posterior q(x). (This means we have to do a full VI step for each dataset x we sample!) We could then in principle ask how far the distribution of calibration probabilities deviates from normal, but in this paper they suggest (following on from other literature) to instead measure how <em>asymmetric</em> this probability is.</p>
<p>Thus, the VSBC diagnostic is to test for asymmetry in the distribution of calibration probabilities. They do this using a Kolmogorov-Smirnov test between the distribution of probabilities and one minus that distribution. More specifically, they actually focus on <em>marginal</em> probabilities - so where I said 'z' above, imagine this is one dimension of z. Thus, they look at marginal calibration probabilities. This is necessary because z < z' only makes sense for scalars.</p>
<p>So running the diagnostic means running VI multiple times over simulated datasets. If your generative model of the data is poor, this diagnostic won't tell you much about how your VI scheme will work on real data, or indeed on a given instance of real data, since VSBC gives average performance. An advantage of VSBC over PSIS is that it looks at marginals, so you can potentially identify <em>which</em> dimensions in z are problematic during fitting.</p>
<h3>Applications, etc.</h3>
<p>Given these two diagnostics, they then show how they can be used in a couple of different settings - Bayesian linear regression, logistic regression, a hierarchical model (the famous Eight-School model), and a cancer classification application. In all cases, they use mean-field Gaussian automatic differentiation variational inference.</p>
<p>The big question for me and probably a lot of other users of variational inference is how well these can be applied to the types of posteriors we try to approximate using hideous neural networks. VSBC may be computationally impractical because it puts the whole VI procedure inside an inner loop, although it's easily parallelisable. High-dimensional posteriors are problematic for importance sampling and thus PSIS, although I don't know what "high" is - 10, 100? 1000?? Multimodality in the posterior is also a challenge, as they point out in the discussion - the VI approximation could completely miss a mode, but the PSIS diagnostic would nonetheless indicate all is well. They suggest to use PSIS to evaluate some other divergence (such as a KL divergence) to diagnose this case.</p>
<p>In summary, this has been a post about evaluating variational inference using two diagnostics - Pareto-smoothed importance sampling, and variational simulation-based calibration. At its core this paper feels like an application of previous/existing work to a slightly new domain (variational inference). I'm curious to try these diagnostics on my own variational posteriors. Code is seemingly available (maybe just for PSIS) - R package (<a href="https://cran.r-project.org/web/packages/loo/index.html">loo</a>), and also a <a href="https://github.com/avehtari/PSIS">Python/Matlab port</a>.</p>NIPS 20172017-12-20T00:00:00+00:002017-12-20T00:00:00+00:00corcratag:None,2017-12-20:ml/2017-12-20-nips2017.html<p><em>I'm continuing my tradition of summarising conferences I attend. Previous posts: <a href="ml/2016-12-16-nips2016_b.html">NIPS 2016</a>, <a href="ml/2015-12-14-nips2015.html">NIPS 2015</a>, <a href="ml/2016-02-17-aaai2016.html">AAAI 2016</a>, <a href="ml/2016-07-05-icml2016.html">ICML 2016</a>. I also went to AAAI 2017 to present my <a href="https://arxiv.org/abs/1607.04903">work on unitary recurrent neural networks</a>, but didn't write a summary.</em></p>
<p>This was my third time attending NIPS, but my first time …</p><p><em>I'm continuing my tradition of summarising conferences I attend. Previous posts: <a href="ml/2016-12-16-nips2016_b.html">NIPS 2016</a>, <a href="ml/2015-12-14-nips2015.html">NIPS 2015</a>, <a href="ml/2016-02-17-aaai2016.html">AAAI 2016</a>, <a href="ml/2016-07-05-icml2016.html">ICML 2016</a>. I also went to AAAI 2017 to present my <a href="https://arxiv.org/abs/1607.04903">work on unitary recurrent neural networks</a>, but didn't write a summary.</em></p>
<p>This was my third time attending NIPS, but my first time attending NIPS with jetlag. The advantage of jetlag is that it provides a topic of small talk less agonisingly self aware than the weather (weather readily avoided by waking up at 6am). The downside of jetlag is me standing glassy-eyed in front of a poster, trying to formulate intelligent thoughts but just yawning really, really obviously. </p>
<p>After a few days of complaining about the jetlag I realised I was probably exhausted because <em>NIPS is exhausting</em>. The problem is early mornings, listening to talks, bumping into people I know, talking to people I don't know, having meetings, talking to recruiters, talking over dinner, going to poster sessions, talking at posters, finding people who I had previously talked to as strangers but who are now acquaintances and talking to them again, and so on. Having gone twice before did not teach me moderation, and I was hoarse by Thursday. I also experienced an interesting fluctuation in my desire to do research, which I have depicted in the following graph: <em>(enthusiasm has since returned, luckily)</em></p>
<figure style="display: block; float: none; margin: auto; width: 50vw;">
<img src="images/2017/nips/graph.jpg" style="width: 35vw;">
<figcaption>
Figure 1: We observe that research enthusiasm of the PhD student is a nonlinear function of Days of NIPS (dNIPS), with two local maxima attained towards the ends of day 3 and 5. Data beyond day 6 could not be reliably collected due to hostility from the test subject.
</figcaption>
</figure>
<p>This analysis clearly indicates that the optimal length of NIPS (including tutorials and workshops) is three days. Recent work (private communication) suggests that "taking breaks" can prolong the research-excitement peak, sustaining the individual beyond the end of the conference, providing hope for 2018. When I got back to Zurich I slept for 7 hours, arose for 7 (during which time I did a roller derby exam, but that's another blog post), then went back to bed for another 10. My body had no idea what was going on.</p>
<p>As in 2016, I'll organise this by topic. This post is rather long, but each section is largely independent so feel free to pick and choose.</p>
<ul>
<li><a href="#tutorials">Tutorials</a></li>
<li><a href="#wiml">Women in Machine Learning</a></li>
<li>Main Conference<ul>
<li><a href="#invited">Invited Talks</a></li>
<li><a href="#spotlights">Spotlights and Orals</a></li>
<li><a href="#posters">Posters</a></li>
</ul>
</li>
<li><a href="#ml4h">Machine Learning for Health</a></li>
<li><a href="#conclusion">Conclusion</a></li>
</ul>
<h2><a name="tutorials"></a>Tutorials</h2>
<p>The first day of WiML actually coincided with the tutorials, so I was only able to attend those in the morning. I went to <a href="https://optimaltransport.github.io/">A Primer on Optimal Transport</a>. I then got <a href="https://en.wikipedia.org/wiki/List_of_cognitive_biases#Frequency_illusion">Baader-Meinhof'd</a> about it for the rest of the conference.</p>
<p><img src="images/2017/nips/skating.png" style="float: right; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;"></p>
<p>I was twenty minutes late to the tutorial. This is decided to commute to the conference on roller skates (see frame from snapchat selfie video, right), and on the first day I misjudged how long it would take (my Airbnb was about 3 miles away). </p>
<p>Unfortunately missing the start of a tutorial, especially a mathematical tutorial, can be fatal. I arrived in the middle of an explanation of how Kantorovich's formulation of optimal transport relates to Monge's formulation and I had no reference for what was going on. I tried to sneakily look things up on Wikipedia to catch up, but all was lost and I came away from the tutorial with only an intuitive understanding of the optimal transport problem, and that Wasserstein barycentres are better than l2 averages for combining distributions, usually. In case you missed it, here are the <a href="https://www.dropbox.com/s/55tb2cf3zipl6xu/aprimeronOT.pdf?dl=0">slides (pdf)</a>. I said to myself that I'd go and learn optimal transport real quick and give a coherent summary of it here, but I also want to write this post before I graduate.</p>
<h2><a name="wiml"></a>Women in Machine Learning Workshop</h2>
<p>WiML took place on the tutorial day (Monday), and also on symposia day (Thursday). I am not sure why they split it up like this.</p>
<p>Last year I said that 15% of the 6000 NIPS attendees were women. I don't recall them releasing statistics about attendee demographics this year, but apparently 10% of unique authors amongst submissions were women (amongst accepted submissions? unknown), so the gender situation in ML is still pretty dire. Fixing this is a hard problem and not really my area of expertise (except for what I know from invariably being involved in conversations about Women in STEM), but I'm pretty sure events like this help. Why do I think that? Well, this year was the first instance of the <a href="https://blackinai.github.io/">Black in AI</a> workshop, and while I didn't attend (I was at the healthcare workshop), even seeing people tweeting about it made me way more aware of the work being done by Black researchers. So hopefully WiML also alerts people to the existence of good work getting done by women. Oh, and travel grants! I could imagine in this era of NIPS-selling-out-rapidly that pre-purchasing tickets to redistribute to minority groups could also play a part in promoting diversity. Weird to think of women as minority group, but apparently we only comprise <a href="https://data.worldbank.org/indicator/SP.POP.TOTL.FE.ZS">49.58%</a> of the world's population these days.</p>
<h3>Interesting talks/posters:</h3>
<ul>
<li>
<p>(contributed talk) <a href="https://www.linkedin.com/in/peyton-greenside-298a5881">Peyton Greenside</a> spoke about using graph convolutional networks to model Hi-C and also ATAC-seq data. I wanted to talk to her at the poster session, and once again (<a href="http://apeiroto.pe/ml/nips-2016.html">this happened last year too</a>) her poster was on the other side of the board to mine. You can find her talk at 1:14 into <a href="https://www.facebook.com/WomenInMachineLearning/videos/1956846487664316/">this video</a>.</p>
</li>
<li>
<p>(invited talk) <a href="http://www.cs.mcgill.ca/~jpineau/">Joelle Pineau</a> spoke about <strong>Improving health-care: challenges and opportunities for reinforcement learning</strong>. The talk focused on <em>slow and small research</em>: research with small sample sizes, acquired slowly. She spoke about designing treatment strategies for epilepsy, probably referencing this paper: <a href="http://www.cs.mcgill.ca/~jpineau/files/panuccio-expneur13.pdf">Adaptive Control of Epileptiform Excitability in an <em>in vivo</em> Model of Limbic Seizures</a> (or <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4884089/">this one</a> but I can't find the PDF). The idea is that brain stimulation can prevent seizures (cool!), and you can use reinforcement learning to build a controller (controlling the frequency of applied stimulation) to achieve the same level of seizure control while minimising the required amount of stimulation. One lesson she highlighted from this work is that models (in the 'animal model' sense) are important (they use a seizure model from mouse brain cells, I think), and having existing baselines to build from also helps. She also described some work on bandits to do cancer treatment optimisation, which I think I actually already wrote about in my <a href="http://apeiroto.pe/ml/icml-2016-not-by-the-day.html">ICML 2016 post</a>.</p>
</li>
<li>
<p>(invited talk) <a href="http://theory.stanford.edu/~nmishra/">Nina Mishra</a> spoke about <strong>Time-Critical Machine Learning</strong>. She spoke about anomaly detection on huge streams of data, using <a href="http://proceedings.mlr.press/v48/guha16.html">Random Cut Forests</a>, and she spoke about machine learning in medical emergencies (probably this paper: <a href="http://theory.stanford.edu/~nmishra/Papers/timeCriticalSearch.pdf">Time-Critical Search</a>). When faced with a medical emergency, people will ring the relevant emergency number, and then, a lot of people will turn to Google for help. This isn't always the most efficient way to get useful information, so they did some work on trying to detect (using search query and other metadata such as time, location, query history) whether or not a person was in an emergency situation, with the intention to give more relevant results. Someone asked if it wouldn't be easier to just make a special emergency-search app, but Nina pointed out that nobody wants to download an app in an emergency situation. (I do wonder if phones could come with such an app by default, but making that standard is a whole other challenge). She <em>did</em> however describe a possible emergency app, which I think was called Samaritan (reminding me of the very cool <a href="https://www.goodsamapp.org/">GoodSAM app</a>), that guides a user through performing CPR. Part of the procedure involves putting the phone on the person's chest and using its accelerometer to guide CPR compressions. Nice use of ubiquitous smartphone tech.</p>
</li>
</ul>
<p>Regarding the poster sessions, I spent all of the Monday session presenting my poster (see the Healthcare workshop below), and much of the Thursday session talking at my friend's poster (<a href="https://arxiv.org/abs/1712.00643">Learning the Probability of Activation in the Presence of Latent Spreaders</a>) and sneaking peeks at the <em>Interpretable Machine Learning</em> symposium - video of a panel session <a href="https://www.youtube.com/watch?v=kruwzfvKt3w">here</a>, and video of the debate <a href="https://www.youtube.com/watch?v=2hW05ZfsUUo">here</a>.</p>
<h3>Roundtables</h3>
<p>As in previous years, the roundtables were one of the highlights of WiML for me. It's a great opportunity to meet senior scientists I might not otherwise be able to, and also to get to know some of the other WiML attendees.</p>
<p>I ended up going to four tables - two career-based, two topic-based:</p>
<ul>
<li>
<p><em>Choosing between academia and industry</em> - I went to the same topic last year, but this time the table mentors were both in academia, so I got a somewhat different perspective. This is also a question I've spoken to people about and thought about, so I didn't learn much, but it's useful to have one's thoughts externally validated. The gist is that academia gives more freedom, at the cost of stability, potentially having to teach, having to supervise students, and having to <s>beg for money</s> write grants. Not all of these are necessarily negatives - some people like teaching and supervising (nobody likes writing grants). Meanwhile, industry may limit research freedom, but provides <em>more</em> stability, and (usually) freedom from having to run your own lab with all that entails.</p>
</li>
<li>
<p><em>Establishing collaborators/long-term career planning</em> - the roundtable I attended wasn't especially enlightening on this topic, but the talk from <a href="http://raiahadsell.com/index.html">Raia Hadsell</a> touched on it, and gave some good long-term career advice. The advice was this (taken from one of her slides):</p>
<ul>
<li>If you like to go deep, make some room for novelty and risk.</li>
<li>If you are a renaissance woman, try going deep.</li>
<li>NIPS and WiML are <em>your</em> community - be a participant.</li>
<li>speak loudly. ask questions. be strong</li>
</ul>
<p>I'd not self-identify as a 'renaissance woman' (I go for 'attempted polymath'), but I tend to aim for <em>multifaceted</em> (see the name of this website), so the advice to go deep was hard to hear, and therefore useful. (I just love when people tell me things I don't want to hear, it's why I use twitter.)</p>
</li>
<li>
<p><em>Generative models</em> - a lot of this roundtable consisted of me discussing evaluation of GANs with Ian Goodfellow. This was a bit selfish because it's a topic of direct relevance to my <a href="https://arxiv.org/abs/1706.02633">current work on recurrent GANs for medical data</a> (see also below) and maybe less interesting to others. However, I also think evaluation is one of the most interesting GAN-related questions right now. There's understandably a lot of focus on the GAN objective and optimisation procedure, thinking about convergence and stability and so on, but optimisation without evaluation seems foolish.</p>
</li>
<li>
<p><em>Machine learning for healthcare</em> - we discussed some of the big challenges facing MLHC, like data sharing, causality, and something else I've forgotten but lists should always contain three elements. I've not worked on causality before, but I'm increasingly aware of how causal reasoning (especially counterfactual reasoning) plays a role in trying to understand observational medical data. More about healthcare in the section on the healthcare workshop.</p>
</li>
</ul>
<h1>The Main Conference</h1>
<h2><a name="invited"></a>Invited Talks</h2>
<figure>
<img src="images/2017/nips/longbeach.jpg">
<figcaption>
Long Beach in December: not bad
</figcaption>
</figure>
<p><a href="https://research.google.com/pubs/JohnPlatt.html">John Platt</a> spoke about <strong>Powering the next 100 years</strong> (<a href="https://youtu.be/L1jLpkvKPh0?t=1727">video</a>), which was less environmentalist than I was hoping, and more about economics (also important, less exciting). He also spoke about nuclear fusion, which is very exciting, and possibly important (in the future). One issue I had with the premise of this talk is that I don't think we should be <em>trying</em> to expand US power usage to the rest of the world - the US uses disproportionately much energy relative to other developed nations (even with high standards of living, see also the <a href="https://en.wikipedia.org/wiki/2000-watt_society">2000-watt society</a>), so while it would be nice if we <em>could</em>, I would personally rather focus on minimising our energy consumption until it is sustainable to consume more. But anyway, assuming the premise, they use machine learning to optimise both the economics of power usage, and for identifying promising (and safe) experiments to run on fusion reactors.</p>
<p>I missed <a href="http://www.psi.toronto.edu/~frey/">Brendan Frey</a>'s talk about reprogramming the human genome, and <em>also</em> <a href="https://keysduplicated.com/~ali/">Ali Rahimi</a>'s talk for the <strong>Test of Time Award</strong>. I sorely regret missing the latter talk because people kept asking me about it. I had to wait until I got back to Zurich to rectify the matter, but having now watched it (available <a href="https://www.youtube.com/watch?v=ORHFOnaEzPc">here</a>), I get the fuss. </p>
<p>So, regarding <strong>Rahimi's talk</strong>: Yann LeCun quickly posted <a href="https://www.facebook.com/yann.lecun/posts/10154938130592143">a response</a>, and Ferenc Huszár posted <a href="http://www.inference.vc/my-thoughts-on-alchemy/">another response</a>, and I should make a separate blog post to add my incredibly important opinions on the matter, but I'll just cram them right in here. Ali Rahimi's talk claimed that much of machine learning these days is alchemy - people are building models that work, seemingly by magic, which we don't quite understand. As a relative newcomer (remember, only my third NIPS) I can't hark back to any golden days of rigour and understanding, but I can certainly say that the things he suggested - simple experiments, simple theorems - are appealing.</p>
<p>My take: We should not make unsubstantiated claims in science. We should design experiments to test claims we make about our models, and we should not accept speculatory claims from others as fact. How often do papers today fail by these measures? Rahimi's talk implies this happens often enough to be worth calling out. I <em>feel</em> like I have read papers which make unsubstantiated claims, or over-explain their results, or introduce poorly-defined concepts, but I can't recall any to mind, so my claim must remain purely <em>speculative</em>.</p>
<p>What really resonated with me from Rahimi and also Huszár's points is that <em>empiricism does not imply lack of rigour</em>. A lot of what I do is quite empirical. A lot of what I do is somewhat applied. I've struggled with feeling like it's less scientific as a result. I've felt like I am "just" doing engineering. But the best way I have come to understand this work, which was captured in this point about empiricism, is that rigour does not need to be <em>mathematical</em> (forgive me, I am a former theoretical physicist, so this has taken me some time to realise). Experimental design is also rigorous when done well. Building a model to solve a problem may be a kind of engineering, but trying to <em>understand</em> it afterwards, forming hypotheses about its behaviour and then testing them - this can, and indeed should, be done rigorously. Otherwise, you show that a model exists which can achieve a certain performance on a certain task on a certain dataset, and little else.</p>
<p>The next talk I actually attended was <strong>The Trouble with Bias</strong> from <a href="http://www.katecrawford.net/">Kate Crawford</a> (video <a href="https://www.youtube.com/watch?v=fMym_BKWQzk">here</a>). This was a great talk, and I'm glad it got a prime spot in the program. Not only was her public speaking skill commendable (the slides just vanished near the end and she barely skipped a beat), but the talk was really interesting. I admit I was worried I'd already know most of the contents, since I read things about bias on a semi-regular basis (somehow). Even if I'd known everything she was going to say (which I didn't), I'd consider this talk a good distillation and overview of the pressing issues. She made an illuminating distinction which I shall now paraphrase.</p>
<p>When it comes to bias, there are harms of <em>allocation</em> and harms of <em>representation</em>. Biased allocation is easy to see - someone got a loan someone else didn't, someone got bail and someone else didn't, etc. These are concrete and tangible, immediate, and easy to quantify. <em>Representation</em> on the other hand relates to impressions and stereotypes. Google searches for 'CEO' returning all white men is a <em>representational</em> bias, and its effect is much harder to measure. Images of Black people being labelled as 'gorillas' is <em>representational</em> bias and while clearly hurtful, the impact of <em>allocation</em> is not immediately obvious. Many people generally accept that this kind of representation is bad, but can we blame it for any <em>particular</em> instance of allocation bias? Usually not. Representational bias is diffuse across culture, difficult to measure, and may not have any immediately obvious impacts. An example from me: We as a society are starting to suspect that something about how women are represented in society may be influencing the rates of women going on to study STEM subjects. This representational bias may be slowly manifesting as a tangible absence of female engineers, but it is difficult to formalise or prove that these observations are causally related. And of course, machine learning algorithms (like literally any algorithm) can be biased in either of these ways (and presumably more). Once again: <a href="https://www.youtube.com/watch?v=fMym_BKWQzk">watch the talk</a>.</p>
<p><a href="https://people.eecs.berkeley.edu/~pabbeel/">Pieter Abbeel</a> spoke about <strong>Deep Learning for Robotics</strong> - really, (deep) reinforcement learning for robotics. Probably the most important takeaway from this talk was the 1 second clip of Dota 2 1v1 mid he showed, establishing an important moment in both Dota 2 and NIPS keynote history. The non-Dota content of the talk was largely focused about meta-reinforcement learning, or 'learning to reinforcement learn', and architectures to achieve this. The idea is that you want to build agents which can adapt quickly to new environments, as humans do. One interesting idea was 'Hindsight Experience Replay', which assumes whatever ended up happening was actually the goal, and deriving reward from that. </p>
<figure style="width: 20vw;">
<img src="images/2017/nips/skinner.jpg">
<figcaption>
Reinforcement learning agent re-evaluating its experience.
</figcaption>
</figure>
<p>This converts the usually sparse reward in RL to plentiful reward signals, given the Q-function is augmented with a notion of a goal. He used the cake metaphor that everyone loved from Yann LeCun's keynote at NIPS last year, converting the cherry on top of a cake to multiple cherries on a cake. People can't get enough of the cake joke. It's Portal all over again.</p>
<p>I missed the talks from <a href="https://getoor.soe.ucsc.edu/">Lise Getoor</a>, <a href="http://www.princeton.edu/~yael/">Yael Niv</a>, and <a href="https://www.stats.ox.ac.uk/~teh/">Yee Whye Teh</a> because there is only so much time in a day.</p>
<h2><a name="spotlights"></a> Spotlights and Orals</h2>
<p><em>First, a brief rant.</em></p>
<p>I was quite impressed by the quality of the spotlights and orals this year. Coming from the rather low bar of 'mumbling at a slide covered in equations' of previous years, I was glad to see that many presenters really put time into preparing their talk. These talks give people the opportunity to explain their work to potentially <em>thousands</em> of fellow researchers, so giving a terrible talk is insulting both to the audience and to the people who didn't get that opportunity.</p>
<p>I've thought about the implications of having an additional selection process for determining orals and spotlights. There's a trade-off between highlighting really good papers (with possibly terrible speakers) and highlighting less meritorious work (with a good communicator). There's also a challenge of being fair to non-native English speakers when assessing presentation quality - it would not be acceptable to condemn a talk on the basis of the speaker's command of English. </p>
<p>I try to assess talks by how much they have considered the audience - considering what the audience already knows, what may be obvious (or not, usually), what the really important things in the work are, and what can be skipped without degrading the story. But how to do this without (subconsciously) judging the fluency of the speaker's language and delivery is not entirely clear. I'm sure there is already bias in how the quality of one's English influences paper acceptance (either through clarity or unknowingly discriminatory reviewers), so adding an additional layer on the presentation quality may exacerbate the issue. On the other hand, communication is really important for scientists, and the conference should do what they can to ensure the content is high quality. Maybe some sort of (optional) pre-conference speaking workshop for those invited to give orals and spotlights?</p>
<p>Ranting aside, a selection of talks I took note of:</p>
<ul>
<li>
<p><a href="https://arxiv.org/abs/1703.04389">Bayesian Optimisation with Gradients</a> - <em>Jian Wu, Matthias Poloczek, Andrew Gordon Wilson, Peter I. Frazier</em>. Augment Bayesian optimisation using gradient information - 'derivative-enabled knowledge-gradient (dKG)'. They put a Gaussian process prior over the function to be optimised, resulting in a multi-output GP for both function and gradient (the gradient of a GP is a GP). It works better than methods not using derivatives, but I rarely have access to derivatives when I'm doing hyperparameter optimisation in deep networks, so I'm not sure how useful it would be for me.</p>
</li>
<li>
<p><a href="https://arxiv.org/abs/1705.07874">A Unified Approach to Interpreting Model Predictions</a> - <em>Scott Lundberg, Su-In Lee</em>. The framework is called 'SHAP' (SHapley Additive exPlanations). The idea is to interpret the model by assigning features importance values for a given prediction. This work unifies six existing methods by proposing a notion of a 'additive feature attribution method'. They also find that their approach agrees well with human-derived feature attribution scores.</p>
</li>
<li>
<p><a href="https://arxiv.org/abs/1709.01894">Convolutional Gaussian Processes</a> - <em>Mark van der Wilk, Carl Edward Rasmussen, James Hensman</em>. They consider a <em>patch-response</em> function, which maps from image patches to real values, and place a Gaussian process prior on this function. Considering the sum of the patch-response function on all patches of the image as another function, its prior is also a Gaussian process. Computational complexity is a huge barrier here, which they address by using inducing points in the <em>patch</em> space, corresponding to using inter-domain inducing points (an idea which is already understood, if not by me).</p>
</li>
<li>
<p><a href="https://arxiv.org/abs/1703.06856">Counterfactual Fairness</a> - <em>Matt J. Kusner, Joshua R. Loftus, Chris Russell, Ricardo Silva</em>. Consider predictors as counterfactually fair if they produce the same result if a sensitive attribute were different. This means that any nodes downstream (in the causal graph) of that sensitive attribute may also be different. This implies that a predictor will necessarily be counterfactually fair if it is only a function of nodes which are <em>not</em> descendants of the sensitive attribute, unsurprisingly enough. They address the fact that this is rarely feasible (almost everything in a person's life may be affected by their race, for example), by considering other models. For example, using residuals of variables, after accounting for (using a linear model) the sensitive attributes. One nitpick: I take issue with the example they give in Figure 2 (level 2). They introduce a latent variable which is predictive of success (GPA, LSAT, first year law school average grade) independent of sex and race, and call this <em>knowledge</em>. I think this is a weird choice - <em>surely</em> knowledge is affected by sex/race, if only by influencing available educational opportunities and ability to study unimpeded (for example, the need to work during school/college, the need to look after family members). I am trying to think of another name for this node which is <em>not</em> plausibly influenced by sex or race, some sort of intrinsic attribute of the person - 'grit'? 'general intelligence'? 'luck'? (But who wants to base law school admissions on luck?) I can't imagine the authors were intending to make any kind of political statement about the nature of knowledge here, but it seems like a weird error(?) in a paper dealing with social issues.</p>
</li>
<li>
<p><a href="https://arxiv.org/abs/1708.02183">Multiresolution Kernel Approximation for Gaussian Process Regression</a> - <em>Yi Ding, Risi Kondor, Jonathan Eskreis-Winkler</em>. The popular method for scaling GPs is to approximate the kernel function using a low-rank approximation (the Nyström approximation). There are some issues with that: is a low-rank approximation reasonable? Which part of the eigenvalue spectrum of K' (that is, K + sigma I, which appears in the MAP estimate of the function) is the most important? This work proposes and develops a different kind of kernel approximation, depending on the data, where local factorisations are used, and it can be assumed that 'distant clusters [of data] only interact in a low rank fashion'. My cursory skim of the paper wasn't enough to get exactly what they're doing, but I love to see work questioning common practices and trying to understand/improve on them.</p>
</li>
<li>
<p><a href="https://arxiv.org/abs/1705.08933">Doubly Stochastic Variational Inference for Deep Gaussian Processes</a> - <em>Hugh Salimbeni, Marc Deisenroth</em>. Why do I always end up reading about GPs? I'm not even using them (right now?!). The tl;dr on this paper is that they got deep (that is, multi-layer generalisations of) GPs to work. Previously they didn't work particularly well because the variational posterior required each layer to be independent, an assumption which this work drops by introducing a new variational inference procedure (hence the title). They show that this model works even on datasets with a billion examples.</p>
</li>
<li>
<p><a href="https://arxiv.org/abs/1705.09655">Style Transfer from Non-Parallel Text by Cross-Alignment</a> - <em>Tianxiao Shen, Tao Lei, Regina Barzilay, Tommi Jaakola</em>. Separate content from style, in text. This is interesting to me because, like <em>years ago</em>, (2014) we had discussed using language embeddings to remove stylistic choices from the language of doctors, to try to standardise text across multiple authors. I'm not saying we have any claim whatsoever to the idea - ideas are cheap, implementation matters - but I'm interested to see that someone has - sort of - achieved something like what we wanted. They assume they have corpora with roughly the same <em>content</em> distribution but different <em>style</em> distributions, and try to learn a latent representation (which they formulate using a probabilistic model). I have a big armchair-linguist issue with the idea that style is independent of content, because if you consider content as meaning then a <em>lot</em> of meaning is conveyed through <em>how</em> someone says something, and indeed even in their examples, they consider 'sentiment' as style, in which case I actually don't know what they mean by content. They actually mention in the introduction that one can only hope to approximately separate style and content even with parallel data, but they never really clearly define what they mean by 'content' of a sentence.</p>
</li>
<li>
<p><a href="http://papers.nips.cc/paper/6827-deep-multi-task-gaussian-processes-for-survival-analysis-with-competing-risks">Deep Multi-task Gaussian Processes for Survival Analysis with Competing Risks</a> - <em>Ahmed M. Alaa · Mihaela van der Schaar</em>. The risks are competing because the patient can only die from one thing. The model attempts to produce survival times (time-to-event) using a deep, multi-task (since multiple risks) Gaussian process. They use an intrinsic coregionalisation model for the kernel functions to account for multiple outputs, which models task(=output) dependence independently of input dependence, but simplifies calculations a lot (I tried to build a more complicated multi-task kernel function once and it was a big mess). They also point out that using a deep GP alleviates some dependence on the exact form of the kernel function. This work (unsurprisingly) uses the 'old' (2013) work on deep GPs, so I wonder how much it would benefit from the improved deep GPs (see above).</p>
</li>
<li>
<p><a href="https://arxiv.org/abs/1705.10915">Unsupervised Learning of Disentangled Representations from Video</a> - <em>Emily Denton, Vighnesh Birodkar</em>. They want to separate time-varying and stationary parts of a video. Then you can predict future frames by applying a LSTM to the time-varying components. That's pretty neat! How do they achieve this? They use four networks - two encoders (one for scene (stationary information), one for pose (time-varying)), a decoder which maps pose and scene vectors to produce a frame, and a scene discriminator which tries to tell if pose vectors came from the same video. They construct loss terms to impose their constraints (separating time-varying and static elements), including some interesting adversarial loss terms.</p>
</li>
</ul>
<h2><a name="posters"></a> Posters</h2>
<figure style="width: 40vw; float: none; display: block; margin: auto;">
<img src="images/2017/nips/posters.jpg">
<figcaption>
The quiet poster hall on Monday morning.
</figcaption>
</figure>
<p>My experience of the poster sessions suffered the most as a result of jetlag, so I ended up looking at far fewer posters than I would have liked (even accounting for my eternally overambitious plans for poster sessions). This was also the first year where I got invited to ~cool parties~, so I went to some of those, too.</p>
<p>The hall for the posters included what seemed like gratuitous space between rows, but it filled up rapidly (the crowd at the Capsules poster was sizeable). I admit I always think about roller derby these days when I'm trying to get past crowds of people, but hip checking strangers isn't a great way to do poster sessions (I <em>assume</em>).</p>
<p>My poster session strategy is the following:</p>
<ul>
<li>before the conference: go through the list of papers and note the interesting ones</li>
<li>don't leave any time to actually read the papers</li>
<li>forget about the list, fight through crowds of large men to peer at poster titles</li>
<li>eventually, learn things</li>
</ul>
<p>A humble plea to poster presenters: please don't stand directly in front of your poster while you're talking about it, I can't see and I don't want to get so close to you that you start talking to me.</p>
<p>Here's a little caveat about this part of the blog post: I didn't visit all these posters. I'm just taking the opportunity to mention more interesting papers.</p>
<ul>
<li>
<p><a href="https://arxiv.org/abs/1612.09328">The Neural Hawkes Process: A Neurally Self-Modulating Multivariate Point Process</a> - <em>Hongyuan Mei, Jason Eisner</em>. Alongside optimal transport, Hawkes processes appeared in my radar of possibly-interesting terms this NIPS, so I decided to take a look at this paper. I got so engrossed that I realised I was actually <em>reading</em> the paper (I usually do a cursory skim to produce these summaries), so I've had to stop myself in the interest of giving other papers a chance. In short: a Hawkes process is a kind of non-homogeneous Poisson process (the rate of the process can vary in time) where events can <em>increase</em> the probability of future events (the events are self-exciting). In this work they generalise the Hawkes process (allowing for inhibitory events, for example) and use a <em>continuous-time LSTM</em> to model the intensity functions of the given events. Also, they use a <em>meme dataset</em> (amongst others) to train the model, so the paper includes amusing lines like</p>
<blockquote>
<p>"We attribute the poor performance of the [non-neural] Hawkes process to its failure to capture the latent properties of memes, such as their topic, political stance, or interestingness".</p>
</blockquote>
<p>The idea of trying to study memes computationally is funny, because even humans barely understand memes.</p>
</li>
</ul>
<figure style="display: block; width: 40vw; margin: auto; float: none;">
<img src="images/2017/nips/rqadsnzazfqz.jpg"
<figcaption>
Example of a typical "meme"
</figcaption>
</figure>
<ul>
<li>
<p><a href="https://arxiv.org/abs/1710.02224">Dilated Recurrent Neural Networks</a> - <em>Shiyu Chang, Yang Zhang, Wei Han, Mo Yu, Xiaoxiao Guo, Wei Tan, Xiaodong Cui, Michael Witbrock, Mark Hasegawa-Johnson, Thomas S. Huang</em>. Like a dilated CNN, but... an RNN. They achieve this using dilated recurrent skip connections. This is different to the usual skip connection (which takes information from some previous state of the RNN) in that it <em>doesn't</em> rely on the immediately previous state. That's what makes it a dilation. You can stack layers with different dilation lengths to get a sort of 'multiresolution' RNN. If this sounds similar to the <a href="https://arxiv.org/abs/1402.3511">Clockwork RNN</a>, you're right, but see section 3.4.</p>
</li>
<li>
<p><a href="https://arxiv.org/abs/1711.05411">Z-Forcing: Training Stochastic Recurrent Networks</a> - <em>Anirudh Goyal, Alessandro Sordoni, Marc-Alexandre Côté, Nan Rosemary Ke, Yoshua Bengio</em>. Yes, I care a lot about RNNs. I work on (medical) time series data, if that wasn't already apparent. This paper adds to the growing work on combining deterministic RNN architectures with stochastic elements (like state space models), hitting an intractable inference problem, and using variational inference with a RNN-parametrised posterior approximation. So what's new here? They observe that these models can often neglect to use the 'latent' part (the stochastic elements), so they add a regularisation term to the ELBO which 'forces' the latent state at time <em>t</em> to be predictive of the hidden state of the backwards-running inference network. And this works better, empirically. When I first saw this paper I panicked because the title makes it sound very similar to an idea I have been cooking up, an idea which I got stuck on because I was trying to explain an additional regularisation term in terms of a prior (on <em>something</em>). But these authors just go ahead and use a regulariser without any probabilistic interpretation, so it's probably fine to do that. Note to self: not everything has to be mathematically beautiful.</p>
</li>
<li>
<p><a href="https://arxiv.org/abs/1703.04977">What Uncertainties Do We Need in Bayesian Deep Learning for Computer Vision?</a> - <em>Alex Kendall, Yarin Gal</em>. I first learned about (and immediately loved) aleatoric and epistemic uncertainty in my applied Bayesian statistics class back in Cambridge, so despite not featuring RNNs, I was interested in this work. In this context, aleatoric uncertainty is the uncertainty inherent to the observations, whereas epistemic uncertainty arises from uncertainty about the model parameters (which could in principle be reduced with more training). So this work studies epistemic and aleatoric uncertainty in deep networks (for computer vision), and shows that modelling aleatoric uncertainty improves performance in semantic segmentation and depth regression.</p>
</li>
<li>
<p><a href="https://arxiv.org/abs/1705.08639">Fast-Slow Recurrent Neural Networks</a> - <em>Asier Mujika, Florian Meier, Angelika Steger</em>. Phew, back to RNNs. This work proposes a RNN architecture attempting to combine the advantages of multiscale RNNs and deep transition RNNs. Basically, it's a 'new model architecture' paper. They show good results on two language modelling tasks, and do further analyses of the properties of their model. Multiscale (temporally speaking) data is extremely common in medicine, so something like MIMIC-III would have been a great test-case for this model as well. Maybe I'll find a masters student to explore this (I obviously don't have time because I spend all my time writing blog posts).</p>
</li>
<li>
<p><a href="https://arxiv.org/abs/1705.10888">Identification of Gaussian Process State Space Models</a> - <em>Stefanos Eleftheriadis, Thomas F.W. Nicholson, Marc Peter Deisenroth, James Hensman</em>. A lot of work focuses on inferring the latent states of a GP state space model. Here, they (also) look at learning the model itself. An important difference between your typical GP setting and the GP-SSM is that the <em>inputs</em> to the GP in the latter case are <em>latent</em> states (of the state space model), so they have to infer <em>both</em> the latent states <em>and</em> the transition dynamics (that's the model). They use variational inference with a bidirectional RNN as the recognition network, so you know I'm on board.</p>
</li>
<li>
<p><a href="https://arxiv.org/abs/1709.02012">On Fairness and Calibration</a> - <em>Geoff Pleiss, Manish Raghavan, Felix Wu, Jon Kleinberg, Kilian Q. Weinberger</em>. This work seems to be a follow-up to <a href="https://arxiv.org/abs/1609.05807">this paper</a> which was written to analyse <a href="https://www.propublica.org/article/machine-bias-risk-assessments-in-criminal-sentencing">this piece on bias in criminal sentencing from ProPublica</a> (ProPublica also <a href="https://www.propublica.org/article/bias-in-criminal-risk-scores-is-mathematically-inevitable-researchers-say">followed up</a> on this and other research following their investigation). So first up: it's awesome to see academic research and investigative journalism interacting in this way. In the precursor paper they provide an impossibility proof (which is given a simplified geometric proof in this paper) for simultaneously satisfying calibration and equalized odds (equal false positive and false negative rates between groups). As hinted in the precursor paper, relaxing the notion of equalized odds (for example, sacrificing equal false positive rates) may allow you to keep calibration, and that's what they show in this paper.</p>
</li>
<li>
<p><a href="https://arxiv.org/abs/1705.08821">Causal Effect Inference with Deep Latent-Variable Models</a> - <em>Christos Louizos, Uri Shalit, Joris Mooij, David Sontag, Richard Zemel, Max Welling</em>. The focus of this work is in account for <em>confounders</em> (by modelling them as latent variables) while doing effect inference, particularly in the presence of noisy proxies of true confounders. They achieve this using a 'causal effect variational autoencoder' (CEVAE).</p>
</li>
</ul>
<h1><a name="ml4h"></a>Machine Learning for Health (<a href="https://ml4health.github.io/2017/">ML4H</a>)</h1>
<p>I speculate that they're moving away from the previous acronym (MLHC - machine learning for health care) due to a collision with the <a href="http://mucmd.org/">MLHC conference</a> (previously abbreviated MUCMD). Apparently MLHC (the conference) will be in Stanford in 2018, which is a shame because I feel I should attend it, but I really didn't enjoy travelling to/from California for NIPS. Also, I think conference organisers should be avoiding the USA (or any other country with restrictive or racist visa policies) if at all possible right now. </p>
<p><em>Anyway</em>. The workshop, unrelated to the MLHC conference, was an all-day affair on the Friday of NIPS. There were all the usual things: invited talks, spotlight talks, (frustratingly short) poster sessions, and people crammed into one room for 8 hours. I missed the panel because I was stuck at lunch, and I missed Jure Leskovec's talk because I was ~ networking ~. For the rest, I took some notes.</p>
<p>Talks:</p>
<ul>
<li>
<p><a href="http://dbmi.hms.harvard.edu/person/faculty/zak-kohane">Zak Kohane</a> - <strong>AI in Medicine That Counts</strong>. He distinguished between AI that does what doctors do, AI that does what doctors <em>could</em> do (but don't), and AI that does what doctors can't do. I am reminded of <a href="https://lukeoakdenrayner.wordpress.com/2016/11/27/do-computers-already-outperform-doctors/">this post</a> from Luke Oakden-Rayner which distinguishes between tasks we're building ML systems to solve, and tasks which doctors actually do. They're not the same, and Kohane made the point that they need not be, in general. We can see gains in outperforming doctors on e.g. diagnostics, but we can also see gains in doing analyses doctors simply can't do (because they're not computers). Kohane gave an example of a child with ulcerative colitis who was saved from colonectomy after they ran a gene expression analysis on children with similar irritable bowel disease and identified an effective drug (indirubin). He also provided a good comparison between medicine and what Deepmind has been achieving with AlphaZero (on Go and other games). Achievements like AlphaZero make people think AI is about to take over the world (from what I can tell), but medicine is far from AI-led mastery:</p>
<ul>
<li>it's non-deterministic</li>
<li>it's not fully observable</li>
<li>the action space is not discrete</li>
<li>we have no perfect simulators</li>
<li>'episodes' in medicine are not short (consider the number of seconds in a typical ICU stay, consider a person's entire life...)</li>
<li>evaluation is unclear and slow</li>
<li>trial and error is not an option (outside of controlled trials, and even then the trial is highly constrained)</li>
</ul>
<p>In his list he also included that we have huge datasets of human play (for games like Go), but I think medicine is getting there towards having large datasets (at least locally), so I don't count this as a <em>fundamental</em> limitation. He then went on to discuss the money end of medicine, which I'm <em>not</em> a fan of, but if you're to be pragmatic, you gotta understand the game you're playing. He made a point that we may come up with cool technology to improve medicine in different ways, but unless a business argument can be made for it, it likely won't be adopted. This is more clearly true in the US where healthcare is more of profit-oriented than in other countries (e.g. those with socialised healthcare systems) - ML4H @ Socialised Healthcare edition, anyone? We can have it in a neutral country! <em>(Joking aside, I am legitimately interested in the opportunities for ML to benefit from and improve socialised healthcare systems - data centralisation is an obvious point, but perhaps other types of problems are more immediately pressing in systems like the NHS, than they would be in the USA...)</em></p>
</li>
<li>
<p><a href="https://www.microsoft.com/en-us/research/people/jchayes/">Jennifer Chayes</a> - <strong>Opportunities for Machine Learning in Cancer Immunotherapy</strong>. The immune system is an incredibly complicated and therefore cool system, and cancer immunotherapy is a very very cool use of the immune system. With the caveat that I'm <em>not</em> an immunologist, the tl;dr of cancer immunotherapy is: tell your immune system to target and kill cancer cells. This may be what the immune system does already, to some extent. T-cells identify specific antigens, and direct the rest of the immune system to kill cells presenting those antigens. (How do T-cells know what to identify? <a href="https://en.wikipedia.org/wiki/Thymus">The thymus is the coolest organ you've never heard of.</a>) So the challenge is to train T-cells to specifically recognise your cancer cells, but there are <em>lots</em> of possible (neo)antigens. You can formulate this as a matrix completion problem (T-cells v. antigens) to predict the response of new T-cells. She also described work they did for predicting response to checkpoint inhibitors (a type of cancer immunotherapy), highlighting the value of building relatively simple models on small data.</p>
</li>
<li>
<p><a href="https://www.seas.harvard.edu/directory/samurphy">Susan Murphy</a> - <strong>Challenges in Developinging Learning Algorithms to Personalise mHealth Treatments</strong>. This was about the <a href="http://www.heartsteps.net/">HeartSteps</a> project, which tries to encourage physical activity in people who have completed cardiac rehabilitation. That is, it's an app that encourages you to go for a walk. This is a problem of sequential decision making. To maximise positive outcome (more time walking), what sort of notifications should the app send, and when? If someone is driving, you shouldn't bother them. If they just walked somewhere, or are in the middle of walking, you shouldn't tell them to go for a walk. They model it as a (contextual) bandit problem, and have to deal with noise in the data, nonstationarity (the expected reward function changes over time), and that there are longer-term delayed effects from actions. Unsurprisingly (to anyone who's used apps that send them push notifications), after a while people just start ignoring them, and the result of interventions diminish. While the intentions in this work are noble, I can see creepy unintended uses of research like this into user engagement (like <a href="https://usedopamine.com/">this horrible startup</a>). Technology is always a double-edged sword, but if we have to be subjected to personalised advertising and addiction mechanics in games, and so on, at least fewer people should die of heart disease, right?</p>
</li>
<li>
<p><a href="http://vision.stanford.edu/feifeili/">Fei-Fei Li</a> - <strong>Illuminating the Dark Spaces of Healthcare</strong>. I think that was the title. She spoke about three projects in healthcare that use computer vision, and the room was <em>packed</em>. At first I thought everyone suddenly loves healthcare, but then I remembered that Fei-Fei Li is famous. The projects were all about activity recognition from non-RGB video (they had depth sensors and IR video if I recall - these alleviate <em>some</em> privacy concerns). First she spoke about identifying hand-washing to tackle hospital acquired infection. One challenge was in activity recognition given unusual (for research) viewpoints, e.g. cameras on ceilings looking directly down. The second project was about ICU activity recognition, to better understand what people spend time doing in the ICU. The priority here was <em>efficiency</em>, so they developed methods to analyse video which don't require analysis of every single frame, saving a lot of compute while still achieving high performance (on standard video understanding datasets). Finally, she spoke about applications in independent senior living, such as fall detection. This in particular is challenging due to limited training data and rare events (thankfully). They propose to use domain transfer to aid in the data scarcity issues, but she pointed out that much of this work is still in progress.</p>
</li>
<li>
<p><a href="https://healthsciences.ucsd.edu/som/medicine/divisions/med-genetics/research/Pages/Mesirov-Lab.aspx">Jill Mesirov</a> - <strong>From Data to Knowledge</strong>. I am doubtful this was the title of her talk, but we'll run with it. The topic was medulloblastoma, which is one of the most common forms of paediatric brain tumour. 70% of children <em>survive</em>, but only 10% go on to leave independent lives. Their focus is in predicting relapse, which they achieve using a probabilistic model incorporating various clinical and genomic features. She then went on to describe a project to identify novel therapeutics for an aggressive subtype of medulloblastoma driven by Myc (this is a gene). Through mouse xenograft experiments and expression profiling, they found this subtype is likely sensitive to CDK-inhibitors, and found they could extend survival (in mice) by 20% with palbociclib, suggesting a candidate treatment. This sort of analysis is sort of 'well known' to me because my lab (alongside machine learning) works on cancer genomics, but I'd also like to pause for a moment to reflect on two things:</p>
<ol>
<li>As with the example from Zak Kohane (about indirubin), a lot of the time (translational) computational biologists are hunting for threads - persistent patterns in the disease which indicate possible vulnerabilities, which they can then follow up by looking for matches in drugs with known targets. If you can optimise any point in that process, you can probably save someone's life, some day.</li>
<li>A 20% extension in survival is clinically significant, but it's not a cure as we think of it. For mice it's measured in days, for humans probably one or two years if not months. For some cancers, especially brain cancers, this is still where we're at. Fighting cancer is really, really hard.</li>
</ol>
</li>
<li>
<p><a href="https://research.google.com/pubs/GregCorrado.html">Greg Corrado</a>. I just stopped writing down the titles at some point. He spoke about a few different projects:</p>
<ul>
<li>Diagnostics: doctors working alongside algorithms to work better/faster. Examples from Google Brain: screening for diabetic retinopathy (on par with ophthamologists), reading breast cancer biopsies.</li>
<li>Care management/decision support: the idea is to have smart electronic medical records, to help reduce errors and improve care quality. Having observed clinicians interacting with EMRs, I see a lot of potential for improvement here.</li>
</ul>
<p>He mentioned challenges with processing medical data because of how messy it is and I just laughed and laughed and then cried (silently). Apparently they built some sort of <a href="https://www.hl7.org/fhir/">FHIR</a>-based pipeline to integrate data from six healthcare systems, and it worked well, but I didn't write down what they were doing at the end of the pipeline.
He also gave a shout-out to Google's newly open-sourced variant caller, <a href="https://www.biorxiv.org/content/early/2016/12/21/092890">DeepVariant</a>.</p>
</li>
<li>
<p><a href="http://www.oxford-man.ox.ac.uk/~mvanderschaar/">Mihaela van der Schaar</a> - <strong>Dynamical Disease Modelling</strong>. Her work focuses on <em>dynamical</em> modelling, assuming some hidden clinical state which informs observable physiological variables. You could approach this using a hidden Markov model, but she observed that transition probabilities typically depend on sojourn times, necessitating a semi-Markov model. Furthermore, patterns of missingness are informative, suggesting to model observation times, e.g. as a Hawkes process. The informativeness of measurements in medicine may not be immediately obvious, but the rationale (at least in the ICU, my area of focus) is that some measurements are only taken when needed, and they're only needed when the doctor suspects something is up. Even if a measurement is routinely performed, the rate of measurement may increase when patients become more critical. So you have a huge case of missing-not-at-random. She also mentioned their work on modelling competing risks, which I described earlier in this blog post.</p>
</li>
<li>
<p><a href="http://buttelab.ucsf.edu/">Atul Butte</a> - <strong>Translating a Trillion Points of Data into Diagnostics, Therapies and New Insights in Health and Disease</strong>. I didn't take notes for this talk, but his slides are <a href="https://www.slideshare.net/atulbutte/atul-butte-nips-2017-ml4h">here</a> - I'd recommend slide 29. In case that link at some point goes dead, that slide summarises lessons he's learned in MLHC over the years, and these are (paraphrased):</p>
<ul>
<li>Solve the problems that health care professionals need solved, don't just guess</li>
<li>Watch out for models limited by bad inputs (e.g. from patients, from doctors)</li>
<li>Learn what IRB, HIPAA, BAA, ICD-10 codes, CPT codes, CLIA, and CAP are.</li>
<li>Learn patience.</li>
<li>Not everything needs deep learning.</li>
<li>Having all the data on someone is super rare.</li>
<li>Health care inefficiency is not about friction. (He made a point that everywhere there's a cost, someone is making money and will push back against losing that money.)</li>
<li>Data integration <em>can</em> happen, if there's a business reason for it.</li>
<li>Platforms and companies are commoditized. (As subpoints to that he suggests the ML people should come with some medical knowledge, to demonstrate we care about healthcare, and so we don't cost medical collaborators time training us.)</li>
</ul>
<p>Another point he made was that there's a <em>lot</em> of freely-accessible data out there, which is ripe for analysis. And possibly founding startups.</p>
</li>
</ul>
<p><a href="https://github.com/ratschlab/RGAN/blob/master/presentations/nips_ml4h.pdf"><img src="images/2017/nips/nips_ml4h.png" style="float: right; width: 30vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;"></a></p>
<p>As I mentioned, there were two poster sessions. I spent the first one presenting my poster, and much of the second one talking to people, so I didn't get to <em>see</em> too many posters. I've described a lot of work from other people in this post, so let me do the same for myself. At WiML and ML4H I was presenting (variations on) this poster: (right)</p>
<p>Summary of the related paper:</p>
<ul>
<li>
<p><a href="https://arxiv.org/abs/1706.02633">Real-valued (Medical) Time Series Generation with Recurrent Conditional GANs</a> - <em>Stephanie L. Hyland (that's me) and Cristóbal Esteban, Gunnar Rätsch</em>. (For disclosure: the version that was accepted by ML4H was a 4-page version of this preprint, focusing on the medical data and aspects. They asked us to give links to the arXiv versions of our work, but I couldn't in good faith link to the full version as it wasn't reviewed by them. In case you noticed and were wondering why there's no link to the paper the workshop page, it's because of my conscience). </p>
<p>The motivation for this work was that MLHC struggles with data sharing. Medical data is hard to share, with good reason. But it means a <em>lot</em> of work in MLHC is completely unreproducible, and nobody can directly build on it, because they don't have access to the data/task a model was built for. This stifles our progress, and MLHC is hard enough already. So wouldn't it be great if we had a <em>synthetic</em> dataset (without privacy concerns) that we could use to benchmark models and approaches? Shoutout to this related paper with similar motivation from Choi et al.: <a href="https://arxiv.org/abs/1703.06490">Generating Multi-label Discrete Patient Records using Generative Adversarial Networks</a> (they focus on binary and count-valued data, hence our focus on real-valued time-series data).</p>
<p>I'd summarise what we did in this work in three points:</p>
<ol>
<li>Devise a GAN architecture to generate real-valued time series. We call this a 'recurrent' GAN, or RGAN, because it uses RNNs for both discriminator and generator networks (yes, RNNs!). We also have a conditional version which takes label information, allowing the RGAN to generate data from labels.</li>
<li>Devise an evaluation scheme for GANs tailored to our setting. We do this by generating a synthetic training dataset from the RCGAN (labels + features), training a classifier (e.g. CNN, random forest) on it, and reporting its performance on a held-out <em>real</em> test set. We call this the <em>TSTR</em> (train on synthetic, test on real) score. Since we want to use the RGAN to generate synthetic medical data, the TSTR score is of particular relevance.</li>
<li>Analyse empirically whether the RGAN is 'overfitting'. By this I mean, we ask (roughly) if the GAN is more likely to produce samples <em>very similar</em> to training samples than it is to produce other samples (from the same distribution, e.g. the test set). If it is, then we have a problem. Firstly because reproducing the training set is boring and does <em>not</em> require a GAN, and secondly (more importantly) because reproducing the training data set would constitute a serious privacy breach in our setting.</li>
</ol>
<p>On the final point, we also experimented with training the RGAN using differential privacy, <em>just to be extra safe</em>. If you're willing to sacrifice performance you can get some privacy, but it's a harsh trade-off and requires further research.</p>
</li>
</ul>
<p>I held a small reading group in my lab about interesting contributions from the ML4H workshop, so I'll briefly summarise two papers of interest to me:</p>
<ul>
<li>
<p><a href="https://arxiv.org/abs/1712.00164">Generative Adversarial Networks for Electronic Health Records: A Framework for Exploring and Evaluating Methods for Predicting Drug-Induced Laboratory Test Trajectories</a> - <em>Alexandre Yahi, Rami Vanguri, Noémie Elhadad, Nicholas P. Tatonetti</em>. My reason for interest should be obvious. Also, the first author emailed me to get help with <a href="https://github.com/ratschlab/RGAN/">our code</a>, which possibly means they used it. I spent some time answering issues on GitHub and responding to emails, and I'm still quite a junior scientist, so it's really exciting for me to see people taking interest in and actually trying to use my work. Anyways, in this paper, <em>as far a I understand it</em>, they're generating cholesterol time-course data before and during exposure to statins. They do two interesting things: 1) Clustering patients based on a large set of clinical attributes, then training separate GANs on each cluster. 2) Evaluating the performance of the GAN by measuring how well it 'predicts' cholesterol level during statins exposure. They do this by matching generated samples to the closest real (hopefully test-set) sample based on the <em>pre-exposure</em> part of the sequence, then measuring the similarity of the synthetic and real samples during statins exposure. This evaluation method seems a little brittle - imagine there are multiple real samples that look similar to the synthetic one, but respond to statins quite differently, but it's an interesting idea.</p>
</li>
<li>
<p><a href="https://arxiv.org/abs/1712.00181">Personalized Gaussian Processes for Future Prediction of Alzheimer's Disease Progression</a> - <em>Kelly Peterson, Ognjen (Oggi) Rudovic, Ricardo Guerrero, Rosalind W. Picard</em>. I haven't spent enough time with this paper to fully understand it, but the most interesting aspects are: fitting a GP model to a source population, and personalising (i.e. tuning) it to an individual based on their observed data to date using domain-adaptive GPs, and using auto-regressive GPs. Various kinds of GPs. No RNNs.</p>
</li>
</ul>
<h1><a name="conclusion"></a>Conclusion</h1>
<p>This has been an exceedingly long blog post and I hope you're not as exhausted as I am, but this is basically an accurate depiction of my experience of NIPS. A lot of stuff, all the time. I have not even mentioned the <a href="http://bayesiandeeplearning.org/">Bayesian Deep Learning workshop</a>. During the lunch break on the final day I grabbed a burrito and almost fell asleep. I was not the only one. The convention centre by that point was gradually emptying, with scattered people dozing off in chairs, and a prominent left-luggage zone where the registration tables had been. There was a clear sense of winding down, perhaps because the process had already begun for me. I stayed only briefly at the closing party (missing some unpleasantness, it sounds like), and instead walked/skated thoughtfully back to my Airbnb along the beach, pausing to look at the stars and listen to the Pacific Ocean.</p>
<p><Img src="images/2017/nips/longbeach_2.jpg" style="display: block; width: 45vw; margin: auto;"></p>bloodseeker costume2017-10-31T00:00:00+00:002017-10-31T00:00:00+00:00corcratag:None,2017-10-31:making/2017-10-31-bloodseeker-costume.html<p><img src="images/2017/bloodseeker/general_00s.jpg" style="float: left; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;">
Here are a bunch of WIP pictures of the Bloodseeker (Dota 2) cosplay I did for MCM London Comic Con on the weekend. This is the first non-Halloween costume I've made, and the first non-trivial sewing project I've done, so it's far from perfect, but I'm pretty happy with how …</p><p><img src="images/2017/bloodseeker/general_00s.jpg" style="float: left; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;">
Here are a bunch of WIP pictures of the Bloodseeker (Dota 2) cosplay I did for MCM London Comic Con on the weekend. This is the first non-Halloween costume I've made, and the first non-trivial sewing project I've done, so it's far from perfect, but I'm pretty happy with how it turned out overall.</p>
<p>For reference, here's what Bloodseeker looks like... (yes, this is a photograph of my screen)</p>
<p><img src="images/2017/bloodseeker/lol_s.png" style="float: right; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;">
And for further reference, here's what my cosplay ended up looking like... (my face doesn't <em>usually</em> look like that)</p>
<p>I took a <em>lot</em> of progress pictures of the crafting, so I've tried to find a smallish number for each of the components. Most of the crafting took place in my boyfriend's parents' house, saving me the need to fly with two glaives in my bag. Also he has a heat gun.</p>
<h1>The fabric bits</h1>
<p>This costume was my introduction to using a sewing machine (save a day-long class I took with the <a href="http://thethriftystitcher.co.uk/">Thrifty Stitcher</a> in London), so I kept it two two stitches and fumbling around making patterns.</p>
<p><img src="images/2017/bloodseeker/general_01s.jpg" style="width: 48vw; display: block; margin: auto;"></p>
<p>Never have I measured myself so much.</p>
<p><img src="images/2017/bloodseeker/loin_01s.jpg" style="width: 48vw; display: block; margin: auto;"></p>
<p><img src="images/2017/bloodseeker/loin_02s.jpg" style="float: right; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;"></p>
<p>I heard you're supposed to use muslin? Also doubles for making cold-brew coffee. This was me trying to deal with the fact that my waist is sort of, but not exactly, cone shaped. It turns out those little tucks I did are called 'darts', and I didn't invent them.</p>
<p>Originally had this elaborate thing where the flappy bit on the loin cloth would wrap up and around from the back of the waist band. I wanted it to fall right, but I do not understand fabric nearly well enough.</p>
<p><img src="images/2017/bloodseeker/loin_03s.jpg" class="floatl" style="width: 48vw; display: block; margin: auto;"></p>
<p><img src="images/2017/bloodseeker/cape_01s.jpg" style="float: right; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;"></p>
<p>My sewing machine is a Janome Sewist 525S, because that is exactly the one I used at the <a href="http://thethriftystitcher.co.uk/">aforementioned sewing class</a>, so I avoided doing any market research at all.</p>
<p>Sewing interfacing onto the inside of the front of the cape, on the tiniest ironing board. I wanted it to be a bit stiff, so it would retain a mostly-round shape even if there were bones and stuff on it. I think this worked okay.</p>
<p>Comparing different shades of black/red paint/pen on the fabric. Is painting acrylic onto fabric a thing you're supposed to do? I did a lot of that.</p>
<p><img src="images/2017/bloodseeker/cape_02s.jpg" class="floatl" style="width: 48vw; display: block; margin: auto;"></p>
<p><img src="images/2017/bloodseeker/cape_03s.jpg" style="float: right; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;"></p>
<p>This is a collar. I improvised how you're supposed to do collars. I am looking forward to learning how to actually sew things.</p>
<p><img src="images/2017/bloodseeker/general_02s.jpg" style="float: left; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;"></p>
<p>Plain red fabric bits! I kept them in this state for ages because I was afraid of destroying them with painting. One day the skates on my floor will kill me.</p>
<p><img src="images/2017/bloodseeker/cape_04s.jpg" style="float: right; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;">
Drawing patterns onto the cape. I forgot to get like... anything you're supposed to use to draw onto fabric, and it was Sunday (which means everywhere in Zurich is closed), so I just #yolo'd it and directly drew with an 8B pencil. This particular section was also improvisation, because I couldn't find an angle of Bloodseeker where you can actually see the top of his shoulders/back of his neck. There is no evidence Bloodseeker even has a neck. Slit in the back of the head hole to enable me to put it over my massive head. (My head is massive, my roller derby helmet confirms this. Massive.)</p>
<p><img src="images/2017/bloodseeker/cape_05s.jpg" style="float: left; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;"></p>
<p>Painting acrylic onto fabric. I accidentally bought so much red/black paint! I preferred how it looked when it was sort of vaguely-shaded, rather than solid colours in the end. I will make a costume with more exciting painting in it next time.</p>
<p><img src="images/2017/bloodseeker/wraps_01s.jpg" style="float: right; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;"></p>
<p>These wraps <em>did not</em> work out on the day. I did not think about how to get wraps to lie flat and not just slowly fall down my calves and bunch around my shoes. There's also supposed to be a red trim on this, and I did cut it out/sew it, but I didn't have time to do the final assembly. Things to fix for next time.</p>
<p><img src="images/2017/bloodseeker/wraps_02s.jpg" style="float: right; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;"></p>
<p>Sewing myself into the hand wraps was interesting.</p>
<h1>bones</h1>
<p><img src="images/2017/bloodseeker/bones_01s.jpg" style="float: left; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;"></p>
<p>The basic construction of the bones is a papery core with a plaster wrap ... wrapping. Because I obsessively hoard things I suspect may be one day useful, I have an entire box of <em>generic recycled sheets of paper</em>. I managed to use almost a tenth of the box making these bones. Next costume: mostly paper?</p>
<p>Applying plaster wrap is extremely satisfying. I spent an afternoon making these while listening to podcasts. If you ever find you're too easily distracted by your phone/computer, you should try covering your hands with plaster.</p>
<p><img src="images/2017/bloodseeker/bones_02s.jpg" class="floatl" style="width: 48vw; display: block; margin: auto;"></p>
<p><img src="images/2017/bloodseeker/bones_03s.jpg" style="float: right; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;"></p>
<p>Painted a few coats of English breakfast tea on these bad boys. Check out that extremely Swiss shopping bag.</p>
<h1>helmet</h1>
<p><img src="images/2017/bloodseeker/helmet_01s.jpg" style="float: left; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;"></p>
<p>EVA foam! Drafting a helmet: challenging. Building a rugby ball: all too easy. We didn't have a dremel so you can see the jagged edges where I tried to hack at the edge of the foam to create a surface I could join.</p>
<p><img src="images/2017/bloodseeker/helmet_02s.jpg" style="float: right; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;">
Not pictured: <em>sanding some extremely angular corners</em>. Still too angular. These angles haunt my nightmares. Learned I love sanding (somehow??).</p>
<p><img src="images/2017/bloodseeker/helmet_03s.jpg" style="float: left; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;">
Helmet... wings? Flaps? That horrible join is what the angular corners looked liek before the extensive sanding. I think if I do this costume again I will just make the helmet out of fake leather.</p>
<p><img src="images/2017/bloodseeker/helmet_04s.jpg" style="float: right; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;">
Painting on foam is easier than fabric. I actually ended up going over this paint, because it's better if you go EVA foam -> PVA glue -> spray paint -> normal paint, apparently.</p>
<p><img src="images/2017/bloodseeker/helmet_05s.jpg" style="float: left; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;">
I'm pretty proud of the solution I came up with for attaching + fanning the feathers. That's a strip of softer craft foam, which I then painted black and glued to the inside of the helmet. Also, because the helmet is shaped like a rugby ball, there's space for feather shafts in the back.</p>
<h1>glaives</h1>
<p>I made these in the ~1.5 days before MCM, but they were a lot easier than trying to make any clothing. Trying to get things to fit is really hard. For the glaives, I just had to measure how long my forearms are.</p>
<p><img src="images/2017/bloodseeker/glaives_01s.jpg" style="width: 48vw; display: block; margin: auto;"></p>
<p>The basic idea of the glaives is that they're a sandwich of EVA foam (the handles) around a thin-craft-foam-worbla sandwich (the blades). I decided to do it this way because it seemed physically plausible, and would result in something that wasn't too bulky-looking. This photo shows the thin and EVA foams, pre-sanding.</p>
<p><img src="images/2017/bloodseeker/glaives_02s.jpg" style="float: left; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;">
<a href="http://www.worbla.com/?page_id=6543">Worbla's Finest Art</a> ready to be sandwiched around the thin craft foam. I did a sort of <em>partial</em> sandwich, where the worbla didn't completely enclose the foam (see the black extending beyond the gold), to give a sharper blade edge.</p>
<p><img src="images/2017/bloodseeker/glaives_03s.jpg" style="float: right; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;"></p>
<p>Half-sandwiching in progress. Working with Worbla is quite nice! Once we realised you can turn the heat gun down from 600C it all got a lot easier.</p>
<p><img src="images/2017/bloodseeker/glaives_04s.jpg" class="floatl" style="width: 48vw; display: block; margin: auto;"></p>
<p><img src="images/2017/bloodseeker/glaives_05s.jpg" style="float: left; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;"></p>
<p>Love sanding.</p>
<p>Sanded EVA handles + partial worbla sandwich + sharp foam edge. Part of me thinks they looked better like this than post-painting. I think it's to do with the texture - acrylic paint introduces a very... plastic texture.</p>
<p><img src="images/2017/bloodseeker/glaives_06s.jpg" class="floatl" style="width: 48vw; display: block; margin: auto;"></p>
<p>Post painting! Ignore the horrible worbla seams! I had to make up some designs to put on the handles. My boyfriend did most of the painting of the glaives, because I was mysteriously busy with something else at the time (possibly painting acrylic on fabric). Also, he knows how to paint things to look like metal.</p>
<p><img src="images/2017/bloodseeker/general_03s.jpg" style="float: left; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;">
Here I am with my boyfriend in his costume!</p>
<p><img src="images/2017/bloodseeker/glaives_07s.jpg" style="float: right; width: 24vw; margin: 1.5vw 1.5vw 1.5vw 1.5vw;"></p>
<p>The last two things I did with the glaives were: painting shading to try to make them look a bit more three-dimensional, and painting blood on. I bought some fake blood, but it just sort of sat on the surface of the blades, jamlike.</p>
<h1>conclusion</h1>
<p>I think some people who make costumes also make an effort to get good photographs of themself wearing it. I did not do this. (Luckily, the (only) other Dota 2 cosplayer I met at MCM got some photos of us <a href="https://twitter.com/anjaelster/status/924674811829342209">here</a>). Next time, I will get some better photos.</p>NIPS 20162016-12-16T00:00:00+00:002016-12-16T00:00:00+00:00corcratag:None,2016-12-16:ml/2016-12-16-nips2016_b.html<p>We return for another installment of Stephanie Summarises a Conference. My previous work in this area is <a href="ml/2015-12-14-nips2015.html">NIPS 2015</a>, <a href="ml/2016-02-17-aaai2016.html">AAAI 2016</a>, and <a href="ml/2016-07-05-icml2016.html">ICML 2016</a>. I was pleasantly surprised at NIPS to be asked if I was going to write one of these again. Apparently someone somehow found my blog. Ignorance …</p><p>We return for another installment of Stephanie Summarises a Conference. My previous work in this area is <a href="ml/2015-12-14-nips2015.html">NIPS 2015</a>, <a href="ml/2016-02-17-aaai2016.html">AAAI 2016</a>, and <a href="ml/2016-07-05-icml2016.html">ICML 2016</a>. I was pleasantly surprised at NIPS to be asked if I was going to write one of these again. Apparently someone somehow found my blog. Ignorance of this is one of the downsides (??) of not having creepy tracking analytics.</p>
<p>This time we get a <em>table of contents</em> so I can be guiltlessly verbose (I fear how long my PhD thesis is going to be):</p>
<ul>
<li><a href="#wiml">Women in Machine Learning</a></li>
<li>Main Conference<ul>
<li><a href="#invited">Invited Talks</a></li>
<li><a href="#posters">Posters</a></li>
</ul>
</li>
<li><a href="#law">Machine Learning and the Law</a></li>
<li><a href="#mlhc">Machine Learning for Healthcare</a></li>
<li><a href="#misc">Miscellaneous Comments/Observations</a></li>
<li><a href="#conclusion">Conclusion</a></li>
</ul>
<h2><a name="wiml"></a>Women in Machine Learning Workshop</h2>
<p><em>"What are women and how can machine learning stop them?"</em></p>
<p>I didn't register for WiML in time last year, so this was my first time attending. I also managed to miss all the Sunday events by arriving to Barcelona at midnight that night. There was a workshop on Effective Communication where I could perhaps have learned how to write shorter blog posts.</p>
<p>My feelings about having 'woman-only/woman-centric' events are complex, poorly-understood and otherwise beyond the scope of this particular post, but the reality is that women are wildly underrepresented in computer science and machine learning is no exception (about 15% of the 6000-odd NIPS attendees were women, and I don't know what fraction of those were recruiters). I'm so used to being surrounded by men that I barely notice it (except for the occasional realisation that I'm the only woman in a room), so having a large conference hall full of women for this workshop was a bit surreal.</p>
<h3>Interesting talks/posters:</h3>
<ul>
<li>(talk) <a href="http://maithraraghu.com/">Maithra Raghu</a>, <a href="https://arxiv.org/abs/1606.05336">On the expressive power of deep neural networks</a>. They study the expressive power (ability to accurately represent different functions) of neural networks and show that this depends on a quantity they call 'trajectory length'. There's also a companion paper, <a href="https://arxiv.org/abs/1606.05340">Exponential expressivity in deep neural networks through transient chaos</a>.</li>
<li>(poster) Niranjani Prasad, Barbara Engelhardt, Li-Fang Cheng, Corey Chivers, Michael Draugelis and Kai Li. <em>A Reinforcement Learning Approach to Weaning of Mechanical Ventilation in ICU</em>: relevant to my ICU-interests, but this poster was unfortunately on the <em>other side of the board</em> to mine, so I only got to look at it briefly. They're using MIMIC-III, looking at pneuomnia patients and the question of intubation. A challenge was engineering the reward function, which required consultation with clinicians.</li>
<li>(poster) Luisa M Zintgraf, Taco S Cohen, Tameem Adel and Max Welling. <em>Visualizing Deep Neural Network Decisions</em>. They propose a 'prediction difference analysis' method to visualise regions of an image which either support or oppose a particular prediction. This is based on assigning 'relevance' to parts of the input, based on the 'weight of evidence' a particular input gives to a certain class. This is a pre-existing idea, and a cursory glance at the paper doesn't highlight what's novel about their approach - possibly applying it to deep networks? Extending it to analysing the influence of multiple features at a time, possibly?</li>
</ul>
<p>I accidentally presented my poster for <em>most</em> of the poster session and therefore missed out on going around to others. This is a compelling argument for having co-authors who can share the load. For the record, the work I was presenting was <a href="https://arxiv.org/abs/1607.04903">Learning Unitary Operators with Help from u(n)</a>, which I did with my advisor Gunnar Rätsch, and which will be appearing in AAAI-17. I also presented it at the Geometry in ML workshop at ICML, see my post <a href="ml/2016-07-05-icml2016.html">here</a>.</p>
<h3>Roundtables</h3>
<p>What I found especially valuable and unique about WiML were the <strong>roundtables</strong> - one for research advice, one for career guidance. In each one there were subtables for specific topics, with 'experts' to extract wisdom from.</p>
<p>I shamelessly hogged space at the healthcare research roundtable in the first session to listen to Jennifer Healey. She's a researcher at Intel Labs working on using sensor data for human health. That is, if you have continuous audio recording (as one can get from a phone microphone), you can identify a person coughing, measure qualities of it, its frequency, onset and so on. This information is incredibly valuable for making diagnoses and treatment decisions, and it's the kind of data that one could reasonably imagine everyone collecting in the future. One thing I really enjoyed about the discussion was that she was quite aware of the <em>HORRIFYING PRIVACY IMPLICATIONS</em> of this kind of data, and the need to avoid storing (and calculating on) this data on The Cloud. I'm really excited about this avenue of healthcare (as I say every time it comes up) and I'm really glad to hear a senior researcher from a big company talking about the importance of the privacy considerations. As was mentioned in the ML and Law symposium, all personal data you collect is a privacy vulnerability. But collecting this data could have such massive positive healthcare implications that 'solving' the privacy problem is really important. Especially if the data is going to end up getting collected anyway...</p>
<p>The second roundtable I went to (about careers/advice), I spoke to some people at Deepmind about working there (me and everyone else at NIPS, it feels like...), and some other people about how to decide between industry (that is, <em>industrial research</em>) and academia. Both experts at the industry/academia table were in industry, so I'm not sure I got an unbiased perspective on it. The context for all of this is that I'm a 'late-stage' PhD student (the idea of that is rather scary to me - there's still so much to learn!), so I'm looking for internships (got any spare internships? <a href="https://apeiroto.pe/pages/about.html">contact me</a>) and thinking about post-PhD land. The most concrete difference I learned about was that in companies, you may need to send your paper to the legal team before submitting it to a conference, in case they want to patent something first. I'd imagine this also applies to preprints and code and so on. Otherwise, the level of intellectual freedom one enjoys seems to vary, but everyone I spoke to (from a biased sample) seemed largely unconstrained by their industrial ties.</p>
<p>I'd imagine there's a gulf of misery between brand-new startups that have yet to become overly concerned with Product, and established tech companies with the luxury of blue-skies research labs, where you don't get to do cool things and instead must live in a box desperately trying to demonstrate the commercial viability of your research. I'd also imagine that said box-dwellers don't attend roundtables (how do you fit a round table in a square box?).</p>
<p>The final notable thing that happened at WiML was me apparently winning a raffle, but being shamefully absent. I was upstairs charging my laptop and catching up with a friend from MLSS, blissfully ignorant of the prize I would never receive.</p>
<h1>The Main Conference</h1>
<h2><a name="invited"></a>Invited Talks</h2>
<p>The main conference opened with a talk (the Posner Lecture) from <strong>Yann LeCun</strong>. LeCun is famous enough in machine learning that people were excitedly acquiring and then sharing selfies taken with him (a practice I find puzzling), so the things he said will likely echo around the community and I need not repeat them in detail here. In gist he was talking about unsupervised learning (although focusing on a subtle variant he called 'predictive learning'). He used a cake analogy which spawned parodies and further cake references throughout the conference/social media. The analogy is that reward signals (as in reinforcement learning) are the cherry, labels for supervised learning is the icing, and the rest of the cake is essentially unlabelled data which requires unsupervised learning. The growing importance of unsupervised learning is not new, I can say from my intimidating <em>one year</em> of previous NIPS conferences.</p>
<p><strong>Marc Raibert</strong> from Boston Dynamics gave an entertaining talk about dynamic legged robots. This featured many YouTube videos I'd already seen, but was happy to gormlessly rewatch. One amusing thing is the fact that they can't use hydraulics in domestic robots, because they leak. That's a great example of a <em>real-world</em> problem. It might be common knowledge amongst roboticists, but 'you can't use hydraulics because nobody wants oil and stuff on their carpet' would not have occurred to me if I for some reason needed to design a robot. Now, maybe I would not need to design a robot directly, but it's not entirely unlikely that I could design an algorithm making assumptions about the kinds of movements, or the cost of those movements, that a robot could make. And this is why 'domain experts' will always be needed. Probably.</p>
<p>At the end of the talk, someone asked if Boston Dynamcis uses machine learning. They do not. Maybe they should?</p>
<p><strong>Saket Navlakha</strong> spoke about 'Engineering Principles from Stable and Developing Brains'. Part of this talk was based on <a href="http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1004347">this PLoS CB paper</a> where they compare neural network development in the brain to that of engineered networks. In brains, connections are created rapidly and excessively, and then pruned back over time dependent on use (they demonstrate this in mouse models). This is to be contrasted with engineered networks, where adding and removing edges in this way would be seen as wasteful. They demonstrate however that the hyper-creation and then aggressive pruning results in improved network function. They're particularly interested in routing networks, so the applicability to artificial neural networks is not immediately apparent.</p>
<p><strong>Susan Holmes</strong> gave the Brieman Lecture, which exists to bridge the gap between the statistics and machine learning communities. This was the <em>single</em> talk of the conference where I took <a href="https://www.evernote.com/shard/s404/sh/0f22b0fa-65c7-44ac-bd55-551349cc6cbf/2f19eb24c584f88e">notes</a>, because the relevance of the topic to me and others in my lab overwhelmed the need to preserve precious limited laptop battery. The title of the talk was "Reproducible Research: the case of the Human Microbiome", and so was mostly a story about how to do reproducible research, in the context of microbiome analysis. One really cool thing she mentioned was a web application called <a href="http://joey711.github.io/shiny-phyloseq/">shiny-phyloseq</a>, which seems to be an interactive web interface to their phyloseq package. <em>However</em>, it also (I think) records what you do with the data as you explore, which you can then export as a markdown file to include with your paper. I try to emulate this by pipelining my analysis in bash scripts (or within python), but having something to passively record as you interactively explore data seems additionally very beneficial. The <a href="http://www.stat.columbia.edu/~gelman/research/unpublished/p_hacking.pdf">garden of forking paths</a> is a risk during any data exploration. Also, the garden of forgetting exactly what preprocessing steps you did.</p>
<p>There was a touching memorial to <a href="http://www.inference.phy.cam.ac.uk/mackay/">Sir David MacKay</a> during one of the sessions. It's easy, as an early-stage scientist, to get swept up in the negative aspects of academic culture (looking at you, Publish or Perish) and lose sight of the reasons for doing any of this. Hearing about scientists like MacKay, who both think and care deeply, is genuinely inspirational. The only book on my Christmas wishlist this year is "Information Theory, Inference, and Learning Algorithms".</p>
<h2><a name="posters"></a>Interesting Papers/Posters</h2>
<p>Necessarily, a subset of the interesting work.</p>
<h3>Misc</h3>
<ul>
<li><a href="https://arxiv.org/abs/1602.03534">Learning Transferrable Representations for Unsupervised Domain Adaptation</a> - <em>Ozan Sener · Hyun Oh Song · Ashutosh Saxena · Silvio Savarese</em> - jointly learn representation, cross-domain transformation as well as labels to do better domain adaptation.</li>
<li><a href="http://people.csail.mit.edu/beenkim/papers/KIM2016NIPS_MMD.pdf">Examples are not enough, learn to criticize! Criticism for Interpretability</a> - <em>Been Kim · Oluwasanmi Koyejo · Rajiv Khanna</em> - this was a great poster and spotlight talk. The idea is this: to help make sense of massive datasets, we ideally identify some 'representative samples' ('prototypes') which we can manually assess and use to generalise about the rest of the data. The danger is that there will be non-stereotypical data points, which are nonetheless represented in the data and should be considered. They call these examples 'criticisms', and describe an approach to generate both prototypes and criticisms from large datasets.</li>
<li><a href="https://arxiv.org/abs/1606.09184">Disease Trajectory Maps</a> - <em>Peter Schulam, Raman Arora</em> - the objective here is to find latent representations of patient trajectories, and then characterise them (i.e. through clustering). They use a fairly complicated probabilistic model to do this, so the more interesting details are in the paper. They also associate the representations with clinical outcomes to prove that they're 'clinically meaningful', comparing with some other methods of representing time series.</li>
</ul>
<h3>Reinforcement Learning</h3>
<ul>
<li><a href="https://arxiv.org/abs/1606.03137">Cooperative Inverse Reinforcement Learning</a> - <em>Dylan Hadfield-Menell · Stuart J Russell · Pieter Abbeel · Anca Dragan</em> - in traditional inverse reinforcement learning (IRL), the agent tries to learn the expert's reward function. However, to have benevolent robots, we would like them to maximise rewards <em>for humans</em>, not themselves. Additionally, in IRL the agent observes assumed-optimal expert trajectories, which may nonetheless be <em>sub</em>-optimal for learning - one would rather generate teaching, or demonstration trajectories. They formulate a solution to these concerns as a two-player game with learning and acting (deployment) phases.</li>
<li><a href="http://cushmanlab.fas.harvard.edu/docs/NIPS_2016_Teaching_by_demonstration_w_supplementary.pdf">Showing versus doing: Teaching by demonstration</a> - <em>Mark K Ho · Michael Littman · James MacGlashan · Fiery Cushman · Joe Austerweil · Joseph L Austerweil</em> - this work focuses on the second issue raised in the previous one - how does a <em>teaching</em> trajectory differ from a <em>doing</em> trajectory? They formulate it as 'Pedagogical Inverse Reinforcement Learning'd. What's really neat about this work is that they actually did experiments with humans to validate their model's predictions about how people would behave while trying to teach versus simply doing.</li>
<li><a href="https://arxiv.org/abs/1606.02647">Safe and Efficient Off-Policy Reinforcement Learning</a> - <em>Remi Munos · Tom Stepleton · Anna Harutyunyan · Marc Bellemare</em> - 'safety' in this work refers to the capacity of the algorithm to deal with arbitrary 'off-policyness' (that is, the policy to evaluate and the behaviour policy observed need not be close), and 'efficiency' refers to using data ... efficiently. The work seems to combine previous approaches which are either safe or efficient into an algorithm enjoying the benefits of both, with various theoretical results.</li>
<li><a href="https://arxiv.org/abs/1606.04753">Safe Exploration in Finite Markov Decision Processes with Gaussian Processes</a> - <em>Matteo Turchetta · Felix Berkenkamp · Andreas Krause</em> - 'safe' here roughly has its common meaning. They address the issue where an agent, looking to maximise long-term (discounted, perhaps) reward, is willing to tolerate temporary very negative rewards. This is unacceptable for safety-critical agents - they used the example of a Mars rover getting stuck in a crater - so they develop an algorithm (SafeMDP) to <em>safely</em> explore, avoiding unsafe states/actions using noisy observations from nearby states. They also ensure the agent can't get stuck in states without safe escape routes.</li>
</ul>
<h3>Recurrent Neural Networks</h3>
<ul>
<li><a href="https://arxiv.org/abs/1605.07571">Sequential Neural Models with Stochastic Layers</a> - <em>Marco Fraccaro · Søren Kaae Sønderby · Ulrich Paquet · Ole Winther</em> - they combine state-space models (uncertainty about states) with recurrent neural networks (sequential, long time dependencies), and describe a variational inference procedure for the model.</li>
<li><a href="https://arxiv.org/abs/1610.09513">Phased LSTM: Accelerating Recurrent Network Training for Long or Event-based Sequences</a> - <em>Daniel Neil · Michael Pfeiffer · Shih-Chii Liu</em> - they add a time gate to the LSTM unit, which has a parametrized oscillation frequency, controlling when individual parts of the memory cell can be updated. This allows for irregularly sampled sensor data to be integrated and they demonstrate improved performance on long memory tasks. They also have really nice figures.</li>
<li><a href="https://arxiv.org/abs/1611.00035">Full-Capacity Unitary Recurrent Neural Networks</a> - <em>Scott Wisdom · Thomas Powers · John Hershey · Jonathan Le Roux · Les Atlas</em> - this is pretty relevant for/similar to my <a href="https://arxiv.org/abs/1607.04903">recent work</a>, so I'm going to read this paper in detail later. My initial thought upon seeing the poster is that they have some <em>really unnecessary</em> mathematics in there, which also appears in the manuscript - the entirety of section three in their paper is self-evident. I'm a bit concerned that reviewers might think well-known mathematical facts restated as 'theorems' may constitute novel results. <em>Anyway</em> cattiness aside, their model is interestingly different to my approach - they optimise on the Stiefel manifold of unitary matrices directly (I optimise in the Lie algebra), although if you define the Riemannian gradient using inner products on the tangent space, this <em>probably</em> becomes equivalent in some sense. It requires further analysis. Their results seem quite impressive, although they don't do a comprehensive comparison on the same experiments as <a href="https://arxiv.org/abs/1511.06464">Arjovsky & Shah</a>, which are the ones I'm familiar with. I had a nice conversation with one of the authors at the poster, which is really what conferences are about.</li>
<li><a href="https://arxiv.org/abs/1608.05745">RETAIN: An Interpretable Predictive Model for Healthcare using Reverse Time Attention Mechanism</a> - <em>Edward Choi · Mohammad Taha Bahadori · Joshua Kulas · Jimeng Sun · Andy Schuetz · Walter Stewart</em> - their focus here is to have an <em>interpretable</em> model, so the evidence used to make a decision is easily identified. They achieve this using an attention mechanism where the recurrence is on the <em>attention mechanism</em>, not on the hidden state. I'm not sure why RNNs should be seen as intrinsically uninterpretable (you can get gradients of cost with respect to any input, for example), so I'm going to think about this more. Interpretability is crucial for any medical applications.</li>
</ul>
<h2><a name="law"></a>Machine Learning and the Law Symposium</h2>
<p>I was and remain to be confused by the choice of symposia. The options were: Deep Learning, Recurrent Neural Networks, and ML and the Law. RNNs aren't deep? What was the DL symposium covering? Deep but Not Recurrent Learning? Weight-Sharing Is OK but Not Over Time, Never Over Time? As evidenced by the title of this section, I didn't attend either of them, and I also didn't attend enough of the Counterfactual Reasoning workshop on Saturday to say what would have happened if I had gone to them, but there seems to be a naming/scope issue here. Whatever it was, the RNN Symposium was Hot Shit and had to switch rooms with us ML+Law people during the lunch break. As soon as the room change was announced, people started appearing at the fringes of the Law symposium and may have been inadvertently exposed to some meta-ethics. I'm not sure how this planning error occurred - it is natural to assume that most of the growth in NIPS attendance is coming from <em>DEEP LEARNING</em>, which should (??) include RNNs, so that symposium was likely to be popular. Maybe they thought enough people would go to the <em>other</em> DL symposium.</p>
<p>The real question is - did non-DL non-justice machine learners feel cheated of a symposium? Am I wrong to try to place the RNN symposium inside the DL one?</p>
<p>Having just published a <a href="https://arxiv.org/abs/1607.04903">paper (arguably) about RNNs</a>, I <em>should</em> have gone to the RNN symposium, but I can't resist thinking about the broader social impact of machine learning. I've also found myself thinking about morality and justice (and therefore law) more than usual lately, so I had to attend this. Discussions of normative ethics at a machine learning conference? Yes.</p>
<p>I'd consider this symposium a law-oriented follow-on to the 'Algorithms Among Us: the Societal Impacst of Machine Learning' symposium at NIPS 2015 (see my summary <a href="ml/2015-12-14-nips2015.html">here</a>. Having a focus is good. The impacts of machine learning on society are widespread, so trying to cover too many all forces a shallower treatment. High level talk is well and good, but <em>getting stuff done</em> requires being specific. This is actually a point that was raised during one of the panel discussions: how do we balance the need in computational science to formulate very specific, quantified definitions of things (like discrimination) with the requirement of margin of interpretation in law? I was surprised, as a non-lawyer, to hear that such ambiguity could be tolerated, much less <em>desired</em>. The example given for this was in discussions where compromise may only be attained through baking some ambiguity into an agreement, which would then (I suppose) later be argued over as necessary. This leads to another point which was made - law is not a monolith, laws are not absolute immutable statements - law is a <em>process</em>, an argumentative tradition (at least in the US), evolving and iterating and requiring justification at all times (get it - <em>justice pun</em>!). How to integrate algorithms into this process is not as simple as treating them as Truth Functions (shout out to my main man Wittgenstein) on Evidence ... <em>or is it?</em> I get ahead of myself.</p>
<h3>Legal Perspectives</h3>
<ul>
<li><a href="http://www.iankerr.ca/">Ian Kerr</a>, <em>Learned justice: prediction machines and big picture privacy</em>. The 'learned' in the title is partially a reference to the US judge <a href="https://en.wikipedia.org/wiki/Learned_Hand">Learned Hand</a> (<em>what a name</em>). A quote from him, "If we are to keep our democracy, there must be one commandment: Thou shalt not ration justice". As an example of a 'learned AI' he mentioned <a href="www.donotpay.co.uk/">'The World's First Robot Lawyer'</a>, which helps people generate appeal letters. It's actually a pretty standard chat bot, but it's helped to overturn over 160,000 parking tickets in London and New York, which is a <em>massive</em> impact ('helping to protecte vulnerable people from state coercion'). What could we do with more powerful algorithms? He then spoke about <em>prediction</em>, highlighting the links between prediction, preemption, and presumption. This brought us to the <a href="https://en.wikipedia.org/wiki/Prediction_theory_of_law">prediction theory of law</a>, an idea coming from the legal scholar <a href="https://en.wikipedia.org/wiki/Oliver_Wendell_Holmes_Jr.">Oliver Wendell Holmes</a>. This is the idea that 'the law' is simply about predicting what the courts will do, and nothing else. So the study of law is the study of prediction, not morality or anything else. He went on to talk about the 'reasonable expectation of privacy' which is required to understand the scope of the 4th Amendment of the US Constitution. The difficult part is <em>not</em> defining 'reasonable', but rather 'expectation'. What does this word mean? There are two interpretations: it could be <em>normative</em>, or <em>predictive</em>. The US courts have taken the latter stance, and one's 'expectation' of privacy therefore depends on what is <em>possible</em> with generally-available technology. This is terrifying - if I know my phone microphone is always on, and my phone is at risk of being hacked, do I lose the expectation of privacy whenever my phone is on me?</li>
<li><a href="http://www.vub.ac.be/LSTS/members/hildebrandt/">Mireille Hildebrandt</a>, <em>No Free Lunch</em>. One particularly pertinent thing she spoke about was 'Data & Pattern Obesitas'. That is, there is a general desire to collect as much data as possible, to look for as many patterns as possible, simply <em>because</em>. This is dangerous for several reasons, the most obvious of which being that any personal data that is stored is a security risk (looking at you, Big Healthcare Databases). And so she highlighted the importance of <em>salience of purpose</em>, citing the security adage of 'select before you collect'. I think this idea likely goes against the inclinations of many researchers in machine learning/data science, who would rather grab everything, and do some sort of automated relevance detection later. This may be fine in certain domains, but when the data you're operating on is sensitive in some way, it can be fatal.</li>
<li><a href="https://en.wikipedia.org/wiki/Prediction_theory_of_law">Deirdre Mulligan</a> - <em>Governance and Machine Learning</em>: there was not <em>so much</em> machine learning in this talk, but she spoke about various ways technology and governance interact. Voting machines are one obvious place (and topical!). She spoke about how electronic voting systems failed to reproduce the traditional voting system. In pen-and-paper voting, the ballot is a physical artefact of the vote, but in these systems, apparently it was rendered on the fly and not saved. There was no storage of the ballot image, it simply incremented a counter somewhere in the backend. This is obviously a terrible system, but these machines were closed-source (!?!?!), so I guess nobody realised they were working like this until they reverse-engineered them? The mind boggles. Other examples are automobiles - you can hack them (like everything on the IoT), they were avoiding regulation (Volkswagen), product safety was compromised by software updates. The last case highlights the need for certification and verification of post-purchase software updates. If you want to run Windows XP on your computer that's your own business, but unsafe cars (from either software or hardware) are public safety risks.</li>
</ul>
<h3>Technical Perspectives</h3>
<ul>
<li><a href="http://www.cis.upenn.edu/~aaroth/">Aaron Roth</a>: <em>Quantitative tradeoffs between fairness and accuracy in machine learning</em> - Rawls provides a definition of fairness, which is "fair equality of opportunity", which he formalised using a 'discrimination index' - the probability of victimisation (not being selected despite being the most qualified, I <em>think</em>) conditional on being present at a bad round (a round in which a sub-optimal applicant is selected). This was all formulated in a contextual bandit setting, and he described an algorithm called 'fairUCB' (from UCB - upper confidence bound, a standard bandit algorithm) and gave its regret bound.</li>
<li><a href="https://people.mpi-sws.org/~gummadi/">Krishna P. Gummadi</a>: <em>Measures of fairness, and mechanisms to mitigate unfairness</em> - the focus here was on <em>discrimination</em>, which is a specific kind of unfairness. So what is discrimination? A definition is "wrongfully imposing relative disadvantage based on membership in socially salient groups". One could ask what most of these terms mean <em>exactly</em> (and indeed, we must, if we want to computationally model anything), but he focused on the phrase "based on". Some attributes are sensitive, and some are not. Can you simply ignore them? The problem is that, people in different sensitive attribute groups may have <em>different</em> non-sensitive feature distributions, which risks disparate mistreatment and disparate impact. One can test disparity of impact through, for example, proportionality tests, e.g. "an 80% rule" - if 50% of men are accepted, then 40% of women should too. And a shout-out to <a href="http://www.fatml.org/">Fairness, Accountability and Transparency in ML</a>.</li>
</ul>
<p>There were more talks, but I was drifting into the semi-delirious pre-fever stages of the Conference Flu at this point.</p>
<h3>Panel Discussions</h3>
<p>The discussion spotlight was 'Regulation by Machine' from <a href="http://www.law.utoronto.ca/faculty-staff/full-time-faculty/benjamin-alarie">Benjamin Alarie</a>. A question - how to use AI to make better laws? My notes are sparse but a recurring theme (also in MLHC) is that we should use machine learning to <em>help and augment</em> humans, not to replace them. So he was speaking about using ML to - for example - help to predict if it's 'worth' taking a case to court. Apparently many cases go to court which are 'overdetermined given the facts', and it's somewhat easy (citation needed) for an algorithm to identify which these are.</p>
<p>My notes on the actual panel are <em>sketchy at best</em>. It may have been the time or how sick I was but, it felt like people were saying a lot of interesting things without obvious argumentative structure or direction, so it's hard to summarise any <em>salient points</em>. Here are some decontextualised, paraphrased snippets:</p>
<ul>
<li>Deirde Mulligan: the judicial system is not always about applying the same law the same way. You must know the facts, the context... The law wants you to come in and argue about what it means. You can go to court to change the law (she asked how many people had been to court - a couple raised their hands - I've only been to court as a juror). Any algorithm for the law must be both performative and output-focused.</li>
<li>Neil Lawrence: how do judges come to opinions? Also, "I don't want to talk too much as I'm not on the panel."</li>
<li>??? (unknown panel member) - we're assuming the law will furnish us with specific definitions, but actually, policies breed on, thrive on, require a lack of specificity and precision - ambiguity is <em>not</em> an accident!</li>
<li>Ian Kerr: <a href="https://en.wikipedia.org/wiki/Paul_the_Octopus">Paul the Octopus</a> was highly accurate, but does that mean we should trust it?</li>
<li>Deirde: shout-out to <a href="https://www.nolo.com/">Nolo press</a>, making the law easier to understand. Especially important in areas where the cost of fighting something isn't worth it...</li>
</ul>
<p>And a final shoutout to <a href="http://robots.law.miami.edu/2014/wp-content/uploads/2013/06/Chief-Justice-John-Roberts-is-a-Robot-March-13-.pdf">Chief Justice John Roberts is a Robot</a> - <em>Ian Kerr and Carissima Mathen</em>.</p>
<h2><a name="mlhc"></a>Machine Learning for Healthcare Workshop</h2>
<p>With the caveat that these are <em>workshop contributions</em>, here are some interesting papers/posters (with accompanying arXiv papers, so I have a chance to remember anything about them):</p>
<ul>
<li><a href="https://arxiv.org/abs/1612.02460">Demographical Priors for Health Conditions Diagnosis Using Medicare Data</a> - <em>Fahad Alhasoun, May Alhazzani, Marta C. González</em> - they look at insurance claims data from Brazil over a 15 month period - about 6.6 million visits. They represent ICD-10 codes by their distribution over ages (a 100-dimensional normalised vector) and do clustering on this representation.</li>
<li><a href="https://arxiv.org/abs/1610.08735">Stratification of patient trajectories using covariate latent variable models</a> - <em>Kieran R. Campbell, Christopher Yau</em> - they describe a kind of linear latent variable model taking patient covariates into account, and use it on a TCGA RNAseq dataset.</li>
<li><a href="https://arxiv.org/abs/1611.07663">Learning Cost-Effective and Interpretable Regimes for Treatment Recommendation</a> - <em>Himabindu Lakkaraju, Cynthia Rudin</em> - related (possibly extended version) paper here: <a href="https://arxiv.org/abs/1610.06972">Learning Cost-Effective Treatment Regimes using Markov Decision Processes</a>. The 'interpretability' comes in here because their <em>state space</em> (of the MDP) consists of the <em>effects</em> on their patient population of decision lists - ordered lists of rules, each consisting of tuples of predicates (like, properties a patient must fulfill) and actions.</li>
<li><a href="https://arxiv.org/abs/1612.01055">Modeling trajectories of mental health: challenges and opportunities</a> - <em>Lauren Erdman, Ekansh Sharma, Eva Unternahrer, Shantala Hari Dass, Kieran ODonnell, Sara Mostafavi, Rachel Edgar, Michael Kobor, Helene Gaudreau, Michael Meaney, Anna Goldenberg</em> - they're interested identifying subtypes of mental illness using time series, and predicting future phenotypic values. They use a Dirichlet Process-Gaussian Process and compare with latent class mixed models, finding that the LCMMs are actually as good as the DP-GP, although neither model is yet good enough for clinical use.</li>
<li><a href="https://arxiv.org/abs/1612.00475">Transfer Learning Across Patient Variations with Hidden Parameter Markov Decision Processes</a> - <em>Taylor Killian, George Konidaris, Finale Doshi-Velez</em> - they're concerned with patient heterogeneity, and cast this as a multitask learning problem, where different tasks are different patients. They share information between tasks using a GP-LVM, removing the requirement to visit every state to learn the dynamics (which is, of course, infeasible in medicine). -<a href="https://arxiv.org/abs/1612.00611">Predictive Clinical Decision Support System with RNN Encoding and Tensor Decoding</a> - <em>Yinchong Yang, Peter A. Fasching, Markus Wallwiener, Tanja N. Fehm, Sara Y. Brucker Volker Tresp</em> - they represent the patient's time series with a LSTM encoder and concatenate the static information into a representation.As a decoder, they use tensor factorisation. I'm not entirely clear on what is actually contained in this tensor, so the paper will need to be read more carefully.</li>
<li><a href="http://affect.media.mit.edu/pdfs/16.Jaques-Taylor-et-al-PredictingHealthStressHappiness.pdf">Multi-task Learning for Predicting Health, Stress, and Happiness</a> - <em>Natasha Jaques, Sara Taylor, Ehimwenma Nosakhare, Akane Sano, Rosalind Picard</em> - they have wearable sensors and smartphone logs from 30 days of monitoring. They looked at three multi-task approaches: multi-task multi-kernel learning, hierarchical bayes with Dirichlet process priors, neural networks (sharing hidden layers), and single-task versions of all of these.</li>
</ul>
<p>Mandatory shout-out to my contribution to the workshop: - <a href="https://arxiv.org/abs/1612.00467">Neural Document Embeddings for Intensive Care Patient Mortality Prediction</a> - <em>Paulina Grnarova, Florian Schmidt, Stephanie L. Hyland, Carsten Eickhoff</em> - we used document embeddings to predict patient mortality in MIMIC-III, purely using text notes. The embedding procedure uses two layers of CNNs - word vectors are combined into sentence vectors (with a CNN), and sentence vectors are combined into patient vectors (with a CNN), and we use target replication to improve predictive accuracy. This was fairly preliminary (there are many other factors to consider, as ever), but we beat previous work using topic modelling on the task, which is encouraging, and perhaps unsurprising given LDA's inability to deal with multi-word phrases.</p>
<p>This is only a snippet of the interesting work presented at the workshop. I unfortunately came down with Conference Flu about half way through NIPS, and was at my sickest during the MLHC workshop (ironically), so I didn't get to speak to as many poster presenters as I would have liked.</p>
<h2><a name="misc"></a>Miscellaneous Comments/Observations</h2>
<ul>
<li>Generative Adversarial Networks are super hot right now, and by saying this I am contributing to the hype.</li>
<li>Despite having around 6000 attendees, NIPS didn't feel overcrowded (contrast with ICML this year). I'm guessing this was a combination of having an appropriately-sized venue and good crowd-control from the venue staff (they were closing off the top floor when it got too full), or maybe everyone was just busy enjoying Barcelona.</li>
<li>Being a vegetarian in Spain sucks. Given my diet was largely eggs, potatoes and bread for the week, I feel sorry for the vegans in the NIPS community. I for one devolved into a patatas-bravas guzzling monster and don't want to even think about tapas for the foreseeable future.</li>
</ul>
<h2><a name="conclusion"></a>Conclusion</h2>
<p>I feel less obviously exuberant about NIPS than I did last year, which I attribute to a combination of having been (and continuing to be somewhat) ill, and being in the development stage of several new projects where I just want to be <em>getting stuff done</em>.</p>
<p>As I've mentioned before, I think about approaching research in an exploration-exploitation framework. At this NIPS I realised that even within the exploration mode, one can explore exploitatively. That is, you can distinguish between diversity-increasing exploration (seeing areas of the state space/field you've never been in before) and depth-increasing exploration (refining your knowledge of partially-explored states/topics). The latter is arguably a kind of exploitation, because it's exploration with the aim to increase knowledge of things you are <em>intending</em> to use later. You hope.</p>
<p>Bringing this strained analogy back to conferences, this makes the difference between going to talks on things you already sort of know and going to <em>totally new</em> topics. I tried a bit of the latter, because chances are I'm going to read papers relevant to me <em>regardless</em>, but I found spotlight talks suboptimal for learning new ideas without sufficient background knowledge. An alternative approach would be to be incredibly exploitative, pre-emptively read the relevant papers and then talk to the authors at the poster sessions. Perhaps next year I'll be organised enough to do that, because unless you go to the tutorials, 15-minute talks of questionable presentation quality on cutting edge research are not good ways to learn new topics.</p>
<p>What <em>is</em> a good way to learn a new topic (personally), is to write about it. I've been working on a pedagogical post about sparse Gaussian process classification, which will be up next, after a brief diversion into roller derby.</p>roller derby week 42016-09-29T00:00:00+01:002016-09-29T00:00:00+01:00corcratag:None,2016-09-29:life/2016-09-29-roller-derby-4.html<p><em>See week 3 <a href="life/2016-09-24-roller-derby-3.html">here</a>.</em></p>
<p>It had occurred to me that I might injure myself while practising, and I had thought about avoiding practising on the weekends to give myself time to heal before Monday. I think about a lot of things that don't happen. So having somehow intensified the the …</p><p><em>See week 3 <a href="life/2016-09-24-roller-derby-3.html">here</a>.</em></p>
<p>It had occurred to me that I might injure myself while practising, and I had thought about avoiding practising on the weekends to give myself time to heal before Monday. I think about a lot of things that don't happen. So having somehow intensified the the bruise on my thigh on Sunday afternoon, I spent Monday afternoon trying to talk myself out of goinng to training. On one hand, my body was <em>fine</em>... everywhere except the bruise. On the other hand, even light touches against the bruise were bafflingly painful. On another part of the second hand, apparently that place is where I fall, and apparently falling is a thing I do. I consulted the internet on the consequences of bruising already-bruised skin and it told me I have cancer, so I went back pensively writing SQL queries while waiting for the subconscious to figure it out.</p>
<p>In the end, I printed off the <a href="https://wftda.com/rules">rules of flat track roller derby</a> and went to training, where I sat solemnly in the centre of the track, huddled in my antiquated Pirate Party hoodie, gazing jealously at the rest of the newbies. I figured, even if I'm not skating, I can learn something by watching and listening. <em>Or</em>, instead of watching and listening, I could continue to deliberate about joining in, while slowly succumbing to the clammy sense of inadequacy inspired by watching other people get better while I sit on my partially-broken ass shivering like an abandoned dog. I stand by my decisions.</p>
<p>They covered backwards skating, transitions (switching between forward and backwards skating), and derby stops. A derby stop is roughly when you turn around to use your toe stops to stop (in quad skates, the rubber stop thing is on the <em>front</em> of the shoe, as opposed to the back on inline skates). I just went looking for an illustrative gif and fell into a hole of roller derby gifs followed by kentucky derby puppy gifs, so I offer no further explanation of derby stops.</p>
<p>Transitions are worrying for me, because one approach (the simpler/easier one, possibly) is to do a mohawk turn. This amounts to briefly going into first or second position in ballet, where your feet form a line with toes pointing outwards. I have <em>really tight</em> hips, which has not served me well through many hours of ballet and yoga (I can't sit cross-legged, to the confusion of many), so achieving that position with my feet takes time and hurts. I have yet to properly learn transitions (I have yet to properly learn skating backwards), but so far I have been using a weird combination of multi-step-hops and spinning on my toes to turn around. Time will tell if these are acceptable methods, cause I don't see mohawk turns happening any time soon. Maybe I'll skip that part and go straight to jumping 180 degrees.</p>
<p>Later that week, something bizarre happened. Deflated after sitting out of training, and struggling to pull myself out of silver league in Overwatch, I tried some very casual, very careful derby practice at home. My room is small and the rest of the house contains far too many breakable objects to practice in, so home-practice consists of putting my skates on and then rolling carefully back and forth between my computer desk and my wardrobe. One day I will stream myself skating around my room while waiting to respawn in Overwatch, and it will be beautiful and terrible. The bizarre thing was that when I put my skates on, instead of my body seizing up in terror, I continued to feel like a normal person capable of controlling my legs. That is when I discovered I could spin on my front wheels. Had I always felt like this? Was the fear a strange dream? Had I actually found it difficult to do side lunges before? Was I suffering from some temporary bruise-induced delusion? I honestly don't know what happened. It is unsurprising that I would become more comfortable with practice, but I didn't expect it to be a step function. That's not to say that I feel entirely comfortable on skates (<em>lord</em> no), but it seems my fear is now focused on new things (like transitions and crossovers), instead of <em>everything</em>.</p>
<p>Gear talk interlude: The 'newbie' skates I bought are Riedell R3s, which come with PowerDyne (round, adjustable) toe stops. It turns out that these are on the smaller end for toe stops, so balancing on them is a <em>little</em> like balancing on high heels (except, you know, on the toe). Natalie has voiced concerns about twisting her ankle while trying to do a derby stop with these, so we are going to order bigger toe stops, most likely Gumballs. Hobbies: never not incurring costs.</p>
<p>On Saturday we found a carpark by Zurich airport for practice. It was a <em>little</em> too inclined for me to feel happy doing much more than intensely failing at slalom, but I also took some time to explain crossover mechanics to Natalie. I can <em>understand</em> things without being able to <em>do</em> them, a fact which is persistently frustrating. Part of this explanation involved me standing mostly-still and crossing one foot over the other, which is not a thing I thought I could do. In fact, that is a thing which I explicitly said I couldn't do <a href="life/2016-09-15-roller-derby-2.html">two weeks earlier</a>, so I was astonished and smug in equal measure for the rest of the day. Also a wizard. I have a quiet confidence that I could do crossovers if I tried now, but at the time of writing, I've had The Bruise for almost three weeks and it's <em>still</em> there and <em>still</em> (somewhat) painful. During the earlier gif tangent I found a catalogue of derby bruises, which begs the question: how is everyone's first bruise so goddamn <em>small</em>?</p>roller derby week 32016-09-24T00:00:00+01:002016-09-24T00:00:00+01:00corcratag:None,2016-09-24:life/2016-09-24-roller-derby-3.html<p><em>See week 2 <a href="life/2016-09-15-roller-derby-2.html">here</a>.</em></p>
<p>Having discovered and then fixed an embarassingly serious bug in my code on Friday, I spent the weekend before the paper deadline at the office rerunning experiments. This is a slow process - for whatever reason, tensorflow takes several minutes to fully initialise the computation graph for …</p><p><em>See week 2 <a href="life/2016-09-15-roller-derby-2.html">here</a>.</em></p>
<p>Having discovered and then fixed an embarassingly serious bug in my code on Friday, I spent the weekend before the paper deadline at the office rerunning experiments. This is a slow process - for whatever reason, tensorflow takes several minutes to fully initialise the computation graph for my experiments, so there's a decent lag before even first results start coming out. Delays like this are frustrating because they're too long to spend staring at the screen or otherwise doing nothing, yet too short to properly do anything else. Sure, I could practice mindfulness meditation or skim abstracts or read emails or temporarily intensify the attention I am paying to the Hamilton soundtrack constantly playing in the background, but I am a human and I have limits. That weekend, I capitalised on the solitude of a Swiss office on a Sunday to practice some skating. That means putting on all my gear, sitting quietly at my desk typing, and then doing laps up and down the corridor while tensorflow backpropagates through time.</p>
<p>The corridor is long and smooth and mostly empty, but it's not especially <em>wide</em>, so corners and crossovers and such were out of the question. I skated up and down and bumped gracelessly into walls on either end and then I somehow, just, sort of <em>got</em> stickyfeet. What had been demanding and somehow counterproductive became obvious and natural. What did I figure out? Physical actions are hard to explain, but here goes. It has to do with the distribution of weight/balance on the different wheels. So the situation with basic stickyfeet is that you're keeping both skates on the ground, but propelling yourself forward by moving your legs 'out', while your toes point out a bit (if your toes point in, you go backwards and then die). But it's not just 'move your legs out'. <em>For me</em>, it seems that I need to release some weight from my <em>front</em> wheels to facilitate the forward moving. I asked Natalie and she thought it might be outer/inner wheels, so maybe mileage varies here. Whatever it is, I'm pretty sure the DerbyNoob Stance of attempting to cling to the ground through one's skates is directly in opposition to the kind of subtle balance shifts required to actually do anything beyond scrabble desperately.</p>
<p>I also did a bit of backwards stickyfeet-skating, because the movement is the same, just reversed somehow. If I thought I would have been skating backwards (for some definition of skating - I am bad at backwards) within a month of putting skates on, I would not have believed.</p>
<p>In class week three, we did:</p>
<ul>
<li>slalom: This is something from skiing, I think? I did cross-country skiing once. When I was growing up, skiing was the domain of private school kids and my family in Chile. In derby it's weaving between cones. Current status: nah, not really, nope. I just can't turn that tightly. I tried weaving between every <em>second</em> cone and that was almost possible. However, bizarrely, later in the class we had to weave between skaters and I could do that. Maybe staring at cones on the ground makes skating harder. Maybe I'm just afraid of cones. </li>
<li>hopping: I mentioned in <a href="life/2016-08-28-roller-derby-0.html">week 0</a> that I'm able to jump on the surface at the gym. This is true. You know what happens when I jump on other surfaces? I'd upload a picture of The Bruise but it's on that part of the leg where ass becomes thigh, the part of the leg you can't just display unless you're at a beach or in a sexually liberated society. The forbidden leg zone. Let me give myself some credit here. We had to jump over a small pile of cones (<em>cones</em>, you mysterious bastards). My initial reaction was "no, hell no, jesus no" but then I remembered that all is meaningless and came to peace with the jumble of bones and gristle that would soon constitute my body, and I gave it a go. The first few times I basically just landed too hard on the front wheels and kept going, either hitting my toe stops or falling on my knees. A goldilocks siuation was afoot - that was too much front, so I overcompensated the next time and went too much back. Instead of getting eaten by bears or whatever it is that happened to goldilocks, I landed on my back wheels and fell arms-flailingly backwards onto my thigh. Apparently my left upper thigh is just where I fall. I think I crawled off the track and climbed onto a chair, because the initial impact caused my leg to go various kinds of numb. The resulting bruise was mysteriously round and violently purple, probably about eight cm in diameter. More on this later.</li>
<li>focus: this was really fun. We assembled a pack (roughly, 'be within arms distance of two people at all times') and then had to skate around while identifying colours and numbers from various teachers/refs who were possibly behind us. Apparently I skate better when I am slightly distracted. I am reminded of a cognitive test I had done some years earlier at the <a href="https://dublin.sciencegallery.com/">Science Gallery</a> where I had to memorise numbers said aloud while also solving a maze puzzle. They tested both tasks independently and then together, and I did better doing both at once. My explanation for this is that while free to either look or listen (i.e. no maze or no numbers) I got distracted by things in the environment (this was happening in a fairly busy room) which broke my concentration, whereas doing both at once required focus but not in a way that excluded my capacity at the other task. Another example: I find it very helpful to draw/doodle/fidget while listening to things, but unfortunately that comes across badly in meetings. </li>
</ul>
<p>Another amazing thing during the class was that I did a crossover. How? Well, I just... sort of... did it. I had been trying to first practice crossing my feet over while standing still, or skating on one foot, or whatever. But then one of the teachers was like 'just try it' and I was probably already delirious from all the blood pooling in my thigh so I went for it, and it happened, and everything was beautiful and nothing hurt. And then I fell on my knees, but I think that's because I had no end-game for the move. I assumed I would try and fall, so once I wasn't falling I didn't know where to go, and I fell. So a holy grail (there are many) of skating seemed within reach. I had done it once, and I could - in theory - do it again. So that Sunday, after The Bruise had recovered enough that I could walk mostly normally again, I hit the gym.</p>
<p>Insert a wheel-switching montage here. Did I mention I ordered bearings for the new wheels, to make switching easier? And I forgot how to do numbers, so I got half as many as I needed? Masters degree in mathematics right here.</p>
<p>I had been at the gym for about twenty minutes when it happened. I had skated in circles, I had skidded weirdly on stripes on the floor (it's one of those multipurpose courts covered in every sports marking), and then I went for the crossover. And I fell. straight. onto. the. bruise. I wanted to yell at everyone and no one in particular that I already had a bruise there, that I already had a massive, deep bruise, so they would not judge me for crawling back to the bench, trying not to cry. It hurt, it hurt so bad and I felt repulsed and yet obsessed by the idea of pressing on that mess of blood and broken veins. </p>
<p>I sat on the bench and breathed deliberately, waiting for the waves of pain and dizzying shock to subside, psyching myself up to try <em>again</em> because I was so determined to get this, and then a man appeared. He was not in sports attire. He did not have a smiling face. He communicated in limited English that rollerblading is not permitted in the hall. I asked if there was somewhere else I could go. He said no. I asked again and he said he would get someone who spoke better English. He retrieved one of the basketball players who had been in the hall beside me. The basketball player told me that skating was not allowed. The skates would damage the surface. I asked if there was somewhere else I could practice. He said no. I nodded. I thanked the men. I ripped off my knee pads and elbow pads and wrist pads. I took off my skates. I looked at the pile of gear sitting beside me. I looked at the changing room door on the far side of the hall. I tried to shove my gear into my helmet and it didn't fit, so I put my helmet on and grabbed the shoes by the laces and looped my keys around a finger as I held my bottle under my arm, knee pads cupping the shoulder pads, the skates getting heavier as I left sweaty footprints on the floor.</p>roller derby week 2ish2016-09-15T00:00:00+01:002016-09-15T00:00:00+01:00corcratag:None,2016-09-15:life/2016-09-15-roller-derby-2.html<p><em>See week 1 <a href="life/2016-08-29-roller-derby-1.html">here</a>.</em></p>
<p>I endeavoured to revise and presumably master all the material we covered in the first class on a Sunday afternoon (nerd, remember. Historically 'Good At School'). It seemed quite straight forward. I would just repeat the difficult thing until it became easy. I've been there. I …</p><p><em>See week 1 <a href="life/2016-08-29-roller-derby-1.html">here</a>.</em></p>
<p>I endeavoured to revise and presumably master all the material we covered in the first class on a Sunday afternoon (nerd, remember. Historically 'Good At School'). It seemed quite straight forward. I would just repeat the difficult thing until it became easy. I've been there. I used to spend an hour a day <em>just</em> playing scales on my violin. Repetition is the key to mastery. </p>
<p>I failed to account for the fact that in physical activities, mistakes aren't free. They hurt. They can damage you. I'm writing this three and a half weeks after the failed T-stop at the first training, and my ankle still hurts. So when I put my gear on and stood up in the sports hall, instead of taking off with the casually intense focus of one committed to a task, I became very aware of how precarious my situation was. It seemed likely if not utterly predetermined that I would fall, badly, onto my back - maybe twisting my legs or ankles as I went down, or falling onto an arm and breaking it, implausibly - my wrists were too well protected but - presumably the forearm can break somehow - can you break elbows? This in mind, my plans of mastery withered to a single hope - to survive unscathed, and maybe be a bit less terrified in an hour.</p>
<p>Remembering the almost-comically predictable 'falling at the corners' I'd done at training, I managed to expand my rapidly-contracting ambition for the day to include learning how to turn. Because the gym is only available for a few hours on Sundays, I first went home and watched a lot of youtube videos (some relevant) and thought about acceleration, broadly defined.</p>
<p>Here is what I learned: you can turn by pushing the outer foot out. You lean a bit into the turn, putting weight on the inner leg, and push the outer foot roughly 'outwards' (actual trajectory is more like a curve since you're moving forwards at the same time). </p>
<p>When I realised this - in the sense of actually <em>achieving</em> it, rather than understanding it conceptually (which was easy), I felt so accomplished I almost forgot how wildly I had moved the goalposts on my afternoon to get there. I got excited for the prospect of trying the '27 in 5' again, because the secret to turning corners without losing <em>all</em> my speed had been unlocked and maybe I'd get a score I could say in public.</p>
<p>Unfortunately, I almost missed training session two, because I spent most of the day in a haze of pain and sickness, semi-conscious and clawing pitifully in the direction of Netflix. Scientist was baffled. I made a deal with myself where I would go via tram (as opposed to bike - not a fan of cycling when I'm dizzy) and take breaks as often as necessary. Probably not a good health choice, probably don't take health advice from me... or definitely <em>do</em>, because I miraculously got better, and it was certainly due to roller derby and not the extended nap I took in the afternoon.</p>
<p>Highlights of the class included me seeing side planks with leg lifts, thinking 'I can probably do this, I have done this before', and being <em>totally incapable</em> of lifting my legs, because that's what happens when you add a 2kg (?) weight to the end of your leg and also stop going to yoga six months earlier. We also did some 'agility', which involved things like balancing on one skate (I was pretty good at this - I have good balance), jumping to the side (somehow easier than it sounds), and stepping to the side while crossing one foot over the other (<em>LITERALLY IMPOSSIBLE</em>, anyone who can do this is a <em>WIZARD</em>). We also did a pattern of zig-zagging around the track (cutting from side to side) which exceeded my limited ability to do sticky feet (skating without lifting your feet) and involved a lot of baleful middle-distance stares as I rolled unceremoniously to a stop. But I barely fell, and someone said it looked like I had been practicing, so I left the place wearing the invisible sunglasses of a person inwardly giddy with pride.</p>
<p>I was then travelling for rougly a week while trying to finish and submit a paper, so I missed the next training - but it was actually an intro to the extensive rules of roller derby, which I have already largely ready (nerd, remember), so the exhilirating story of learning-to-skate continues uninterrupted whenever I write the next one of these. Right now I have to find a sleeping position that doesn't involve the bruised side of my body.</p>roller derby week 12016-08-29T00:00:00+01:002016-08-29T00:00:00+01:00corcratag:None,2016-08-29:life/2016-08-29-roller-derby-1.html<p><em>See week 0 <a href="life/2016-08-28-roller-derby-0.html">here</a>.</em></p>
<p>I am a nerd. I didn't want to go to class <em>unprepared</em>, so a few weeks before the Rookie Course started, I went to a neighbouring canton to buy derby gear so I could practice. Practice and hope to attain a minimal competency such that I …</p><p><em>See week 0 <a href="life/2016-08-28-roller-derby-0.html">here</a>.</em></p>
<p>I am a nerd. I didn't want to go to class <em>unprepared</em>, so a few weeks before the Rookie Course started, I went to a neighbouring canton to buy derby gear so I could practice. Practice and hope to attain a minimal competency such that I would not be so horribly bruised again, so quickly. Roller derby gear purchased in Switzerland is pretty expensive. My knee pads <em>alone</em> cost 100 francs. But I have a job and a single yoga lesson here costs at least 20 CHF so I can deal with it. And those pads make falling forwards painless, which I rate quite highly. One must remember to fall <em>forward</em>.</p>
<p>An expedition was undertaken to find a location suitable for practice. Such a location must be:</p>
<ul>
<li>flat, ideally completely flat, oh god a single stone will kill me dead</li>
<li>safely enclosed from roads, traffic, hills, chasms</li>
<li>devoid of other people, with their beady, judging eyes</li>
</ul>
<p>And another thing I did not even think to think about:</p>
<ul>
<li>of a surface appropriate for the wheels on my skates</li>
</ul>
<p>It turns out that the wheels which came with the 'starter' skates I got (Riedell R3s) are of a hardness appropriate for concrete and other hard-ish surfaces. (They're Sonar Flat Out wheels, with a hardness of 88A, for reference.) The indoor multi-purpose court we found at our university's sports centre fulfills the first three conditions, to an extent. There are people on exercise machines overlooking the court, but I can deal with judgement better than I can deal with skating into traffic and dying. It fails badly on the last condition. It has some kind of rubberized surface (you can leave small impressions in it with your nails) and when I first put on my skates and tried it out, something felt... wrong. I could stand upright with no effort to stay in one place. I could roll to a graceful stop by ceasing movement. When I tried to move forwards, my feet lagged strangely, and made me stumble. I could jump without filling with abject terror. Something was <em>wrong</em>. I went home and did some research ('why roller skate sticky') and deduced that my wheels were responsible. For a surface that soft you need harder wheels to compensate, and my 88As wouldn't cut it. So I went off and bought some 95A hardness wheels and they seemed <em>better</em>, not <em>perfect</em> but good enough because I'm not made of money or willingness to spend a morning going to Aarau, as pretty as their <a href="https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Flag_of_Canton_of_Aargau.svg/220px-Flag_of_Canton_of_Aargau.svg.png">cantonal flag</a> may be.</p>
<p>Minor logistical issues aside, I managed a tiny bit of practice before the first training session. It's hard to know how much worse I would have been without it. I was bad, real bad. I fell (backwards or otherwise messily) five times. While trying to do a T-stop I messed up somehow and twisted my ankle in a way that seems like something should have broken. My issue was mostly corners. I was trying to stay on the inside of the track to avoid being in the way of the others, who are much better than me (they are mostly more experienced, so this is natural). I can deal with hurting myself but I don't want to cause someone else to fall. The inside of the track has a tigher corner however, so I kept getting off balance. Obvious solution is to stop hugging the inside of the track. Or learn how to turn (coming soon!).</p>
<p>At the end of the session we did a practice '27 in 5' (part of the minimal skills test is to skate 27 laps in 5 minutes) and I did <em>twelve</em> laps in five minutes. That's awful. So bad. Much slow ... <em>but</em> I was intentionally avoiding gaining speed on the straights because I had no idea how to deal with it on the corners, and I <em>definitely</em> didn't want to make someone else fall while they were trying to go fast. Especially not if it involves them falling on me.</p>
<p>We also covered plow stops, which I find a <em>lot</em> easier and less ankle-destroying than T-stops, probably because I can keep both feet on the ground. Overall though, my favourite stopping method is 'falling and curling up in a ball'. Fall small, they say. Be grand, they say.</p>
<p>I was alarmed at first by the horrible disparity in skill level at the Rookie course. Some people were doing <em>crossovers</em> in week 1. I mistakenly tried to keep up and got several days of hobbling around the office as my reward. I resolved to practice (once my leg regained full function) and <em>definitely catch up</em>, because that is <em>definitely possible</em> in a week (spoiler: no).</p>
<p>And now for some thoughts on skill-acquisition. At this point, being on skates feels terrifying. The ground moves perilously beneath me at every moment. Even staying still requires intense and tiresome muscle activity. My whole body is inexplicably involved in the task of not falling to my doom. I imagine however that this is how cycling felt, once. On cycling: I am a good cyclist. I am not an <em>advanced</em> cyclist: there are many things I can't do. I can't swing my leg over my bike and jump off while I'm slowing down, and I can't cycle stably with no hands. I can't turn really sharply. I don't try to do these things. I am good at the things I choose to do (causal direction left as exercise for the reader). I feel utterly comfortable on my bike - it is an extension of me, and I can go where I desire without consciously acting. It would be hard for me to explain exactly how I cycle, because so much of it is automatic. My hope and belief is that this is how experienced people feel on rollerskates. Until then, I can't <em>play</em> while on skates, because I am far too occupied with questions of basic mechanics. I want to get to the stage where I can think more about what I'm doing and less about <em>how</em> I'm doing it. </p>roller derby week 02016-08-28T00:00:00+01:002016-08-28T00:00:00+01:00corcratag:None,2016-08-28:life/2016-08-28-roller-derby-0.html<p>In a turn of events baffling to those who know me, I decided to sign up to (try to) learn to play roller derby. Roller derby is a full-contact sport played on rollerskates. The game basically consists of getting in someone's way, or getting through people who are getting in …</p><p>In a turn of events baffling to those who know me, I decided to sign up to (try to) learn to play roller derby. Roller derby is a full-contact sport played on rollerskates. The game basically consists of getting in someone's way, or getting through people who are getting in your way. It's like 'walking through Times Square' but on rollerskates and the pushing is consensual.</p>
<p>My interest in the sport is incredibly out of character. I'm not a fan of falling over. I don't like getting hurt. I don't really like doing things which might hurt others, and while I <em>do</em> enjoy the sensation of moving quickly, it also terrifies me. I appear to lack any thrill-seeking bones and I've always been fine with that. Why would I do something <em>dangerous</em>? Also, and this is not unrelated, I'm <em>sort</em> of small. I'm 161cm (5'3") tall and weigh about 55kg (120lb). In a game of momentum transfer, I am going to lose. I fare a lot better at academic pursuits, like writing code while slowly horizontalising myself, or drawing amorphous manifolds on whiteboards. Also computer games. I got an accidental headshot in Overwatch last night, so you could say I'm pretty good.</p>
<p>However, I also moved to a new country (Switzerland) recently, and having one's non-work life unceremoniously deleted is a good opportunity to find new hobbies. (Or rediscover old ones, like competitive online video games) I had been aware of roller derby for some time because a former flatmate was involved with the Dublin Roller Girls back when we lived together in 2010. At the time I wasn't interested in the idea of sports, much less <em>violent</em> ones, so I never seriously considered the idea of doing it. Also, I'm so small! I was in the 'too light to donate blood' category back then. However, now that I am older and wiser and excluded from blood-donation for different reasons, I have decided to get out of my comfort zone. Wildly. So far that traditional notions of distance can no longer be meaningfully used to describe the relative locations of roller derby and my comfort zone.</p>
<p>So, while scouting around for Things To Take Up in Zurich I found the <a href="http://www.rollerderby.ch/">Zürich City RollerGirlz</a>, noticed they had a try-out day and convinced my good friend and coworker Natalie to go with me. That was my first time ever on rollerskates. I fell twice on the same spot and had a bruise which lasted, visibly, for three weeks. But it was fun and I learned that the game is more nuanced and less openly brutal than 'shove people, also you're on rollerskates'. There are rules. I knew in a sense that there would be, but I also feared that 'full contact' means anything goes. Thankfully not. </p>
<p>Natalie and I signed up to the rookie course, and I intend to document my progress. Natalie has a video-camera too, so if we remember we might compile clips to make a sweet training montage video at the end. It lasts 12 weeks and culminates in the Minimal Skills Test required to be eligible to actually play roller derby. It seems implausible to me that I can go from <em>never having skated</em> to passing that test in a 12 week period (while also doing a PhD and becoming a professional Overwatch player), but time shall tell. I'm quite motivated to try, because everyone loves underdog stories, and I really like having things to care about that <em>aren't</em> related to my PhD. File this under coping mechanisms.</p>
<p><em>The course actually started two weeks ago, I just didn't think to blog about it until now. I was searching for things like 'how to roller skate' and came across some really useful and reassuring blog posts from other beginners (or ex-beginners), and realised how much I value reading about other people sucking at things. So here I am, sucking at a thing.</em></p>transcribing my accent2016-08-21T00:00:00+01:002016-08-21T00:00:00+01:00corcratag:None,2016-08-21:lang/2016-08-21-transcribing-my-accent.html<p>An exercise in the international phonetic alphabet (IPA).</p>
<p>Here's a quote from the magnificent Margaret Atwood book, "The Handmaid's Tale":</p>
<blockquote>
<p>"Now we walk along the same street, in red pairs, and no man shouts obscenities at us, speaks to us, touches us. No one whistles.</p>
<p>There is more than one …</p></blockquote><p>An exercise in the international phonetic alphabet (IPA).</p>
<p>Here's a quote from the magnificent Margaret Atwood book, "The Handmaid's Tale":</p>
<blockquote>
<p>"Now we walk along the same street, in red pairs, and no man shouts obscenities at us, speaks to us, touches us. No one whistles.</p>
<p>There is more than one kind of freedom, said Aunt Lydia. Freedom to and freedom from. In the days of anarchy, it was freedom to. Now you are being given freedom from. Don't underrate it."</p>
</blockquote>
<p>I recorded myself reading it at a normal pace, not trying to enunciate correctly, trying <em>not</em> to think about my accent, <a href="audio/handmaid.mp3">here</a> is the recording.</p>
<p>And here is my attempt to transcribe the recording into IPA:</p>
<blockquote>
<p><code>[nɐu wi wɒk əlɑŋ ðə seɪm st͡ʃɹitʰ, ɪn ɹɜd pɛɹz, ənd nɵʊ mæn ʃɐət͡s əbsɛnɪtiz ætʰ əs, spiks tu əs, tət͡ʃɘz əs. nɵʊ wʌn wɪsœlz.]</code></p>
<p><code>[dʰɛɹ ɪz mɒɹ ðɜn wʌn kɜnd əv fɹidəm, sɛd æntʰ lɪdiæ. fɹidəm tu ɶnd fɹidəm fɹɐm. ɪn ðə dez əv anœɹki, ɪtʰ wəs fɹidəm tu. nɐu jəɹ bin ɡɪvɪn fɹidəm fɹɐm. dɵʌnt əndəɹetʰ ɪtʰ]</code></p>
</blockquote>
<p>My accent is... a bit weird. I spent my first twenty-three years in south Dublin, so my accent <em>should</em> be unquestionably 'Irish', but people often think I sound American. I don't know why. ¯\_(ツ)_/¯</p>
<p>Things I noticed during transcription:</p>
<ul>
<li>I don't break between words, apparently (does anyone?). While transcribing 'freedom' I had to check that it wasn't actually 'freedoms', because there's no gap in the audio between the [m] and the [s].</li>
<li>vowels are hard and mostly schwas.</li>
<li>I simply cannot make out the difference between some letters, like [æ] and [a]. My ear just isn't that good (yet). I think I need to spend more time learning how the sounds are <em>created</em>, because I found that immensely helpful in distinguishing between, for example, [ʃ] and [ʂ] while studying the consonants.</li>
</ul>
<p>If you <a href="pages/about.html">send me</a> a recording of yourself reading the quote I will try to transcribe it to IPA for comparison purposes. Comparison and judgement.</p>
<p>I imagine transcribing someone else speaking is much more difficult because one can't rely on slow careful repetition with internal observation of the shape of the mouth. That might be a good thing.</p>important site updates2016-07-06T00:00:00+01:002016-07-06T00:00:00+01:00corcratag:None,2016-07-06:meta/2016-07-06-important-site-update.html<p>Two matters, one vastly more important than the other:</p>
<ol>
<li>SSL is active! It was incredibly easy to set up with <a href="https://letsencrypt.org/">Let's Encrypt</a>. Losing SSL was one sad thing about moving away from GitHub pages, but it is clearly remedied. Now you can access my content securely.</li>
<li>This site has a …</li></ol><p>Two matters, one vastly more important than the other:</p>
<ol>
<li>SSL is active! It was incredibly easy to set up with <a href="https://letsencrypt.org/">Let's Encrypt</a>. Losing SSL was one sad thing about moving away from GitHub pages, but it is clearly remedied. Now you can access my content securely.</li>
<li>This site has a new subdomain: <a href="http://dog.apeiroto.pe/">http://dog.apeiroto.pe/</a>. It shows a new dog gif/image on reload. SSL is... not working on the subdomain, I think I need to poke at nginx for that. You can now emulate friendship with me by hitting refresh on that page!</li>
</ol>
<p>The way I did the new image on reload thing is hacky so here goes: I considered trying to actually learn JavaScript and then remembered I had to go wash my horse. So I found a 'load random image on reload' script, which puls images from a list defined in the script. Given I want to just drop files in a folder and have them enter the pupper-rotation this was no good, so I wrote a script (in bash) to compile the contents of the dog-folder and stick that in the HTML. Easy. What I need to do now is combine the 'count puppers and update HTML' script with the 'sync puppers to web server' script and I'll be sorted. Or put both on cronjobs and forget about it.</p>
<p>At the time of writing there are 210 such images. That's 2.1G of doggos. I regularly collect these pictures from twitter/imgur/giphy so it should grow slowly.</p>
<p>Coming soon: cat.apeiroto.pe.</p>ICML 2016 not by the day2016-07-05T00:00:00+01:002016-07-05T00:00:00+01:00corcratag:None,2016-07-05:ml/2016-07-05-icml2016.html<p>The <a href="icml.cc">International Conference on Machine Learning (ICML)</a> was in NYC this year! Unfortunately(?) for me, I moved from NYC to Zürich two months ago. Fortunately for me, I was able to return to attend the conference. Instead of doing a day-by-day breakdown (as I did for <a href="ml/2015-12-14-nips2015.html">NIPS</a> and <a href="ml/2016-02-17-aaai2016.html">AAAI</a>), this …</p><p>The <a href="icml.cc">International Conference on Machine Learning (ICML)</a> was in NYC this year! Unfortunately(?) for me, I moved from NYC to Zürich two months ago. Fortunately for me, I was able to return to attend the conference. Instead of doing a day-by-day breakdown (as I did for <a href="ml/2015-12-14-nips2015.html">NIPS</a> and <a href="ml/2016-02-17-aaai2016.html">AAAI</a>), this post will be arranged thematically. Let's see how I deal with the hard group assignment problem... Skip to the bit you care about.</p>
<p><em>Caveats</em>:</p>
<ul>
<li>I missed some non-trivial fraction of ICML due to finishing my poster, helping collaborators with a grant application, and coming down with illness<ul>
<li>Future conference goal: finish my poster <em>before</em> I travel. </li>
<li>Also don't try to print A0 posters in the USA. It ain't pretty.</li>
</ul>
</li>
<li>I took very patchy notes, haven't read all the papers deeply.</li>
</ul>
<h2>Volunteering at ICML</h2>
<p>I was a student volunteer for ICML, which consisted of working two ~five-hour shifts at the conference. For me these were both Registration Desk. I had 07.30-12.30 on the first and last days, which was possible purely by my being in European time for much of the trip. I woke up at 4am on the first day. Here are some observations:</p>
<ul>
<li>people actually register on the last day, but more people just want to get their badge reprinted<ul>
<li>protip: don't forget your name badge!</li>
<li>you paid hundreds of dollars to get that piece of paper</li>
</ul>
</li>
<li>some people turn up really early to register</li>
<li>90% of ICML attendees were DeepMind employees</li>
<li>registration desk workers could easily be replaced by name-badge-printing kiosks</li>
<li>conference attendees expect a pile of swag upon registration: pens and bags and mugs and programs booklets. Not receiving these items is cause for thinly-veiled indignation</li>
<li>queues for registration are worst in the gap between sessions, naturally</li>
<li>people manage to make it to the top of a line without attempting to find the documents they need<ul>
<li>I have also observed this phenomenon in airports and banks</li>
<li>why</li>
</ul>
</li>
<li>I registered a bunch of people whose papers I have read, and I maintained composure</li>
<li>if I were running the registration desk with excessive time to spare, we would have had a graph of cumulative registrations over time, maybe with a breakdown for geographic origin/broad affiliation</li>
</ul>
<p>Overall it was surprisingly fun. Apparently I rather enjoy that kind of work, so if this whole research thing doesn't work out I have a bright future as a vending machine.</p>
<h2>Tutorial on Deep Reinforcement Learning</h2>
<p>I was only able to attend one tutorial due to volunteering, and it was Deep RL. It was so popular there were <em>two</em> overflow rooms. Intense community interest in deep RL continues. Here's an abbreviated version:</p>
<p><a href="https://twitter.com/__hylandSL/status/744602517275803648"><img src="images/icml2016_deeprl.png" style="width: 40vw;"></a></p>
<p>The deep part comes into play when you use a deep neural network to approximate your value function, policy, environment etc.</p>
<h2>Interesting Papers/Talks</h2>
<p>These are the papers I flagged in the conference app. Did I attend all of these talks? No. Did I attend all of the posters? Also no. In hopefully-meaningful categories:</p>
<h3>Neural Networks</h3>
<ul>
<li><a href="http://jmlr.org/proceedings/papers/v48/lie16.pdf">Learning to Generate with Memory</a>: <em>Chongxuan Li, Jun Zhu, Bo Zhang</em>: a deep generative model with external memory and attention mechanism. The deepness comes in through some nonlinear functions on latent variables which are defined by (deterministic) deep neural networks. Each layer in the network has access to its own external memory, which is seemingly novel in this model. In each layer lower-layer information is combined with the memory to produce the output, using some attention function taking as input the information from the lower layer. I'm not entirely convinced by the experiments that the memory mechanism actually helps that much, although they say it gives better 'qualitative' results.</li>
<li><a href="http://jmlr.org/proceedings/papers/v48/arjovsky16.pdf">Unitary Evolution Recurrent Neural Networks</a>: <em>Martin Arjovsky, Amar Shah, Yoshua Bengio</em>: The idea here is to use a unitary matrix as the evolution operator in an RNN, with a hope to avoid exploding gradients. It seems to result in an RNN which can retain information for longer than a LSTM, and while gradients do vanish slowly, they do so more slowly than other models, and don't explode. I'm working on something of an extension to this work right now, and I had the pleasure of speaking with the authors at length. More details in forthcoming paper, I guess? Or blog post, we'll see.</li>
<li><a href="http://jmlr.org/proceedings/papers/v48/balduzzi16.pdf">Strongly-Typed Recurrent Neural Networks</a>: <em>David Balduzzi, Muhammad Ghifary</em>: I really like the spirit of this work. Let's try to understand RNNs! And take inspiration from functional programming and physics, because why not? The physics part is roughly to preserve 'dimensions' (think units) by preserving the <em>basis</em> of the space. I took issue with this because I think any map from a space to itself is already preserving something (preserving being in the space, that is), but what that means for the model is less clear. The part from functional programming is about separating state and computation, a separation into <em>learnware</em> (with parameters) and <em>firmware</em> (having no parameters, but having state).</li>
<li><a href="http://jmlr.org/proceedings/papers/v48/cohenc16.pdf">Group Equivariant Convolutional Networks</a>: <em>Taco Cohen, Max Welling</em>: Wild simplification/mild understatement: they extend convolutional layers to other kinds of symmetries, not just translational.</li>
<li><a href="http://jmlr.org/proceedings/papers/v48/taylor16.pdf">Training Neural Networks Without Gradients: A Scalable ADMM Approach</a>: <em>Gavin Taylor, Ryan Burmeister, Zheng Xu, Bharat Singh, Ankit Patel, Tom Goldstein</em>: ADMM stands for Alternating Direction Method of Multipliers. They use this with Bregman iteration to train networks <em>without SGD</em>! This method scales linearly over cores, and they compare this to an asynchronous SGD model called Downpour, which scales very strangely. SGD, having <em>many</em> small computations is good for GPUs, whereas CPUs are better for a smaller number of <em>expensive</em> calculations, preferably involving a lot of data. This approach also combats the vanishing gradient problem (unsurprising given there are no gradients to vanish: gradients come pre-vanished), and SGD's tendency towards lingering near saddle-points.</li>
</ul>
<h3>Reinforcement Learning / Bandits</h3>
<ul>
<li><a href="http://jmlr.org/proceedings/papers/v48/he16.pdf">Opponent Modeling in Deep Reinforcement Learning</a>: <em>He He, Jordan Boyd-Graber, Kevin Kwok, Hal Daume III</em>: They develop a model called DRON: Deep Reinforcement Opponent Network, which is close enough to TRON to make me happy. It's based on Mnih's deep Q-networks. DRON has both policy-learning module and opponent-learning module. It's essentially two networks, and they look at ways of combining them: concatenation and using mixtures-of-experts.</li>
<li><a href="http://jmlr.org/proceedings/papers/v48/simsek16.pdf">Why Most Decisions Are Easy in Tetris—And Perhaps in Other Sequential Decision Problems, As Well</a>: <em>Ozgur Simsek, Simon Algorta, Amit Kothiyal</em>: by 'easy' they mean: "one can choose well among the available actions without knowing an evaluation function that scores well in the game". The idea is that comparison becomes easy when some criteria are met, and the relationship between features and criterion (of the comparison) is linear. This linearity requirement seems restrictive, but holds true for the best known tetris player (BCTS).</li>
<li><a href="http://jmlr.org/proceedings/papers/v48/le16.pdf">Smooth Imitation Learning for Online Sequence Prediction</a>: <em>Hoang Le, Andrew Kang, Yisong Yue, Peter Carr</em>: They're looking at imitation learning where actions and the environment are continuous, but the environment is exogenous (not affected by actions). They consider the state space to be both environment and actions (so the policy considers the previous action taken), and enforce smoothness of <em>actions</em>. The application is smooth camera control (the paper is from Disney research), hence smooth actions. Their approach learns a fully deterministic stationary policy, and they have some other contributions whose gravity are somewhat lost on me, but are presumably important.</li>
<li><a href="http://jmlr.org/proceedings/papers/v48/mniha16.pdf">Asynchronous Methods for Deep Reinforcement Learning</a>: <em>Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, Koray Kavukcuoglu</em>: As an alternative to experience replay, they asychronously run multiple agents in different instances of the environment, in parallel. This can then be run on a multi-core CPU rather than a GPU, and is more resource efficient. Some nice ggplots, too.</li>
<li><a href="http://jmlr.org/proceedings/papers/v48/wu16.pdf">Conservative Bandits</a>: <em>Yifan Wu, Roshan Shariff, Tor Lattimore, Csaba Szepesvári</em>: a multi-armed bandit problem where a company wants to maximise revenue while keeping revenue above a constant baseline. In this setting there exists a 'conservative default action', and they propose an extension to UCB (upper confidence bound) where a budget is accumulated using the conservative arm, and when large enough allows for 'safe' exploration.</li>
</ul>
<h3>Representation Learning</h3>
<ul>
<li><a href="http://jmlr.org/proceedings/papers/v48/steeg16.pdf">The Information Sieve</a>: <em>Greg Ver Steeg, Aram Galstyan</em>: What an intriguing title. This is about representation-learning. The idea seems to be to iteratively 'sieve' the data, extracting a latent feature at a time, then passing on a version of the data with the contribution from that feature somehow removed, and so on. Sieving. It relies on the total correlation, or multivariate mutual information, and they describe a way for finding the factors which cause this total correlation to decompose into non-negative contributions.</li>
<li><a href="http://jmlr.org/proceedings/papers/v48/trouillon16.pdf">Complex Embeddings for Simple Link Prediction</a>: <em>Théo Trouillon, Johannes Welbl, Sebastian Riedel, Éric Gaussier, Guillaume Bouchard</em>: a scoring function for link prediction (subject, predicate, object type triples) which uses <em>complex</em>-valued embeddings for entities. Using the inner product in complex space amounts to taking dot products with complex conjugates, which handles asymmetry of the triples. The relationships appear to be parametrised with complex-valued vectors. At a glance it looks like a complex version of DistMult.</li>
</ul>
<h3>Other / ???</h3>
<ul>
<li><a href="http://jmlr.org/proceedings/papers/v48/yoon16.pdf">ForecastICU: A Prognostic Decision Support System for Timely Prediction of Intensive Care Unit Admission</a>: <em>Jinsung Yoon, Ahmed Alaa, Scott Hu, Mihaela van der Schaar</em>: the application here is predicting when/if a patient needs to be admitted to the ICU. They cast it as an optimal stopping problem, and try to learn the unknown stopping rule of the stochastic process: how the physician decides (on the basis of the stream of data) to admit the patient to ICU. They assume patients belong to 'stable' or 'deteriorating' classes, which describe different distributions over physiological streams.</li>
<li><a href="http://jmlr.org/proceedings/papers/v48/gal16.pdf`">Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning</a>: <em>Yarin Gal, Zoubin Ghahramani</em>: I'm not going to give this paper justice by skim-summarising it, so I'll just quote a sentence: _"In this paper we give a complete theoretical treatment of the link between Gaussian processes and dropout, and develop the tools necessary to represent uncertainty in deep learning". Cool cool cool.</li>
<li><a href="http://jmlr.org/proceedings/papers/v48/gilad-bachrach16.pdf">CryptoNets: Applying Neural Networks to Encrypted Data with High Throughput and Accuracy</a>: <em>Ran Gilad-Bachrach, Nathan Dowlin, Kim Laine, Kristin Lauter, Michael Naehrig, John Wernsing</em>: Homomorphic encryption! Homomorphic encryption only allows for addition and multiplication, and ideally with low-degree polynomials, so they have to approximate the usual max pool, sigmoid etc. transformations. One also has to be careful as all operations in the cryptosystem are applied modulo some number. A key thing to note here is that they're not <em>training</em> on encrypted data, just predicting.</li>
<li><a href="http://jmlr.org/proceedings/papers/v48/bauer16.pdf">The Arrow of Time in Multivariate Time Series</a>: <em>Stefan Bauer, Bernhard Schölkopf, Jonas Peters</em>: Non-Gaussian noise breaks time symmetry in multivariate autoregressive moving average (VARMA) models.</li>
</ul>
<h2><a href="https://sites.google.com/site/gimliworkshop/">Geometry in Machine Learning Workshop</a></h2>
<p>Is the title of this workshop an <em>intentional</em> Lord of the Rings reference? I sure hope so.</p>
<p>I spent the whole day at this workshop, since I was presenting a poster and also <em>yay differential geometry</em>.</p>
<p>So why care about geometry for machine learning? Firstly, by geometry we're talking about <em>differential</em> geometry, which is focused on differentiable manifolds (manifolds which <em>locally</em> look flat). Data <em>usually</em> lies on a manifold. We often assume this manifold is Euclidean space (nice and flat), but it often isn't. A simple example is data which lies on a <em>circle</em>, which if you've encountered if you've ever dealt with angular measurements. <a href="http://me.jhu.edu/faculty/gregory-s-chirikjian/">Gregory S. Chirikjian</a> gave a really nice illustrating example in his talk "Learning and Lie Groups": if you consider the range of motions available to a simple noisy robot, after a certain number of steps its possible location will be given by some probability distribution (this is called the 'banana distribution'). This distribution is <em>not</em> Gaussian in <em>x</em> and <em>y</em> (the coordinates of the Euclidean manifold a.k.a. the plane the robot was moving on), but if you recall that its motions were constrained to come from a Lie group (specifically the planar special Euclidean group, SE(2), consisting of translations and rotations in the plane), you can define a Gaussian distribution relative to coordinates in <em>that</em> group space (since Lie groups are manifolds), and <em>this</em> distribution describes its location. For more details, see the paper: <a href="http://www.roboticsproceedings.org/rss08/p34.pdf">The Banana Distribution is Gaussian: A Localization Study in Exponential Coordinates</a>.</p>
<p>Reasons to be careful when your data lies on a manifold seem to be:</p>
<ul>
<li>doing statistics requires a notion of distance, so you must use the distance <em>on the manifold</em> </li>
<li>gradient-based optimisation requires, well, gradients, so you must use the gradient <em>on the manifold</em> </li>
</ul>
<p>This second point is actually highly relevant to the work I was presenting at the workshop, which will become entirely clear once I put the paper on the arXiv.</p>
<p>I think machine learning as a field already cares about manifolds a lot, particularly when it comes to finding low-dimensional subspaces within a dataset. This workshop was however primarily concerned with cases where the (sub-)manifold is already known.</p>
<p>And now, the content: (also, you can get the slides for these talks on the <a href="https://sites.google.com/site/gimliworkshop/schedule">workshop page</a>)</p>
<p><a href="https://web.math.princeton.edu/~nboumal/">Nicolas Boumal</a> spoke about <strong>Optimisation on Manifolds</strong>. <a href="https://web.math.princeton.edu/~nboumal/papers/boumal_optimization_and_estimation_on_manifolds_phd_thesis.pdf">Here</a> is his PhD thesis on the topic. The take-homes were:</p>
<ul>
<li>we have some convergence guarantees for non-convex optimisation on manifolds, see the paper: <a href="https://arxiv.org/abs/1605.08101">Global rates of convergence for nonconvex optimisation on manifolds</a>, <em>Boumal, Absil and Cartis</em>.</li>
<li>he has developed a Matlab toolbox for optimisation on manifolds: <a href="http://www.manopt.org">Manopt</a></li>
<li>free book, <a href="http://press.princeton.edu/chapters/absil/">Optimization Algorithms on Matrix Manifolds</a>, <em>Absil, Mahony, Sepulchre</em></li>
</ul>
<p><a href="http://web.eecs.umich.edu/~girasole/">Laura Balzano</a> spoke about <strong>Subspace Learning by Incremental Gradient Descent on the Grassmannian</strong>.</p>
<ul>
<li>the Grassmannian is a manifold comprised of all low-dimensional subspaces of a particular ambient space, I believe with a pre-specified dimension (so it could be the space of all lines, for example)</li>
<li>her focus area is streaming data, where you want to use first-order methods (not enough data to estimate hessians, for example)</li>
<li>doing SVD where the learned matrices are elements of the Grassmannian (that is, living in a lower-dimensional space), so gradients are on the Grassmannian</li>
<li>more details probably in this paper: <a href="http://arxiv.org/abs/1506.07405">Global Convergence of a Grassmannian Gradient Descent Algorithm for Subspace Estimation</a>, <em>Zhang & Balzano</em></li>
<li>also featuring a live demonstration of separating foreground from background in video! using a laptop and a webcam! More here: <a href="http://arxiv.org/abs/1309.6964">Online Algorithms for Factorization-Based Structure from Motion</a> - <em>Kennedy, Balzano, Wright, Taylor</em></li>
</ul>
<p><a href="http://me.jhu.edu/faculty/gregory-s-chirikjian/">Gregory S. Chirikjian</a> spoke about <strong>Learning and Lie Groups</strong> as I mentioned above:</p>
<ul>
<li>paper again; <a href="http://www.roboticsproceedings.org/rss08/p34.pdf">The Banana Distribution is Gaussian: A Localization Study in Exponential Coordinates</a>, <em>Long, Wolfe, Mashner, Chirikjian</em></li>
<li>also a book (although not free ;_;): <a href="http://www.springer.com/us/book/9780817648022">Stochastic Models, Information Theory, and Lie Groups</a>, <em>Chirikjian</em></li>
</ul>
<p><a href="http://www.sci.utah.edu/~fletcher/">Tom Fletcher</a> spoke about <strong>Probabilistic Geodesic Models</strong>. The motivation is shape analysis (with a medical application in brains), particularly for dimensionality reduction and regression.</p>
<ul>
<li>he gave a nice introduction to the idea of shape: basically, geometry of object invariant of position, orientation, size: when you remove these things you are on the <em>SHAPE MANIFOLD</em></li>
<li>Kendall's Shape Space: defined in a complex space. The idea here is that multiplication by a complex value is a rotation and scaling in complex space, so if you 'quotient' that out, you get Kendall's Shape Space, a complex projective space. (and amusingly for me, Projective Geometry is a class I used to sneak into)</li>
<li>back to the idea that statistics requires a notion of distance, he defined for us the <a href="https://en.wikipedia.org/wiki/Fr%C3%A9chet_mean">fréchet mean</a>, allowing points to be 'averaged' on a manifold, and allowing you to define something that looks like a Gaussian-on-a-manifold...</li>
<li>but a different one than that proposed by Chirikjian, because: there are many ways to arrive at a Gaussian distribution (as a solutions to heat and diffusion equations, as maximum-entropy distributions, the central limit theorem, maximum likelihood solutions to least squares, etc.) and while these seemingly converge on the much-loved Normal distribution in Euclidean space, this doesn't happen on other manifolds... so we end up having 'normal distributions' that look different depending on which definition we started with... oh dear.</li>
<li>I think it was at this point that someone voiced the concern that in an arbitrary manifold, the distance metric is <em>locally defined</em> (because it is defined on the tangent space at a point), so the normalisation constant in your Gaussian-on-a-manifold actually depends on the centre of the distribution. The solution to this is to only look at <em>homogeneous manifolds</em>, manifolds whose isometry group acts transitively, so the manifold 'looks the same' everywhere.</li>
<li>some homgeneous manifolds: spaces with constant curvature, Lie groups, Stiefel manifolds, Grassmiannians, dot dot dot</li>
<li><a href="http://www.oasis-brains.org/">Open Access Series of Imaging Studies (OASIS)</a>: open access brain (MRI) images!</li>
<li>then it got into geodesic regression and the manifold of diffeomorphisms, with a shout-out to the <a href="https://en.wikipedia.org/wiki/Sobolev_space">Sobolev metric</a>, and a mention of Gaussian processes, thus ensuring my interest was piqued</li>
<li>generalisation of probabilistic PCA on a Riemannian manifold: <a href="https://www.sci.utah.edu/publications/zhang13/Zhang_NIPS2013.pdf">Probabilistic Principle Geodesic Analysis</a>, <em>Zhang and Fletcher</em></li>
<li>another relevant paper: <a href="http://link.springer.com/article/10.1007/s11263-012-0591-y">Geodesic Regression and the Theory of Least Squares on Riemannian Manifolds</a>, <em>Fletcher</em></li>
</ul>
<p><a href="http://comet.lehman.cuny.edu/stjohn/">Katherine St. John</a> spoke about <strong>Dimensionality Reduction on Treespaces</strong>, specifically evolutionary trees. Hey, biology! Phylogenetics! The core issue is: you see a set of organisms (their genomes, rather) and want to find the optimal evolutionary tree, out of a very very large set of trees. What to do? Metrics on trees usually look at things like rearrangements ("remember balancing red-black trees?"), distances which are NP-hard to compute. I apparently didn't take many notes during this talk, so have some likely-relevant references:</p>
<ul>
<li><a href="http://comet.lehman.cuny.edu/stjohn/research/treespaceReview.pdf">The Shape of Phylogenetic Trees (Review Paper)</a>, <em>St John</em></li>
<li><a href="http://comet.lehman.cuny.edu/stjohn/research/hillClimbing.pdf">Characterizing Local Optima for Maximum Parsimony</a>, <em>Urheim, Ford, St. John</em></li>
</ul>
<p><a href="http://web.cse.ohio-state.edu/~mbelkin/">Mikhail Belkin</a> spoke about <strong>Eigenvectors of Orthogonally Decomposable Functions: Theory and Applications</strong>. This was partially lost on me, but what I got was:
- we have a well-defined notion of eigenvectors and eigenvalues for matrices, but what of <em>tensors</em> (multilinear forms)? There's no spectral theorem here, the idea of rank is different, 'things are just sort of unpleasant'
- focusing on orthogonally-decomposable tensors makes things easier (sort of an analogue of eigen-decomposition)
- then the trick is to recover the 'basis' the tensor is orthogonally-decomposable on
- he said this was primarily about work with Rademacher and Voss, so this paper is likely the reference: <a href="http://arxiv.org/abs/1411.1420">Basis Learning as an Algorithimic Primitive</a>, <em>Belkin, Rademacher, Voss</em></p>
<p>Finally, <a href="http://seat.massey.ac.nz/personal/s.r.marsland/">Stephen Marsland</a> spoke about <strong>Principal Autoparallel Analysis: Data Analysis in Weitzenbock Space</strong>. This talk got into discussion of connections (maps between elements of tangent spaces), and their curvature, and torsion. It had the same effect that looking at my copy of Spivak's 'A Comprehensive Introduction to Differential Geometry' has: excitement to (re)learn these things but the vague guilt of indulgence in intellectually stimulating but <em>maybe</em> not so directly applicable mathematics. But so cool. Also the sense of having come so close to <em>getting</em> fibre bundles. One of these days.</p>
<ul>
<li>this talk included an entertaining story about the history of Weitzenbocks spaces, Cartan not receiving recognition, and racist messages hidden in books. Forgetting the umlaut in Weitzenböck's name is OK, because he was a racist.</li>
<li>we usually look at the Levi-Civita connection, which is unique and torsion-free. This one weird non-zero torsion tensor. Mathematicians <em>hate</em> it!</li>
<li>intuitive explanation of curvature: the amount you've rotated upon returning to your original position</li>
<li>intuitive explanation of torsion: the amount you've failed to return to your original position, sort of, or, 'how hard it is to stay on the manifold'</li>
<li>Riemann-Cartan space reduces to: Riemannian if torsion is 0, and Weitzenbock if curvature is 0</li>
<li>cryptic statement in my notes: 'prior over tangent spaces?'</li>
</ul>
<p>And that's where my notes end.</p>
<p>The poster session was really good in that I got to speak about my work a lot, but really bad in that it ended before I got to see anyone else's work, or talk much about my work at all. I had so many more things to say! Good thing I have a blog. I'm also working on a manuscript which is very <em>almost</em> ready to go on the arXiv, honestly.</p>
<h2><a href="https://sites.google.com/site/icml2016ersonalization/">Computational Frameworks for Personalisation Workshop</a></h2>
<p>Mistakes were made. I spent the first quarter of this workshop working the registration desk, and the second quarter standing <em>outside</em> the workshop. The afternoon I spent at <a href="https://sites.google.com/site/icml2016data4goodworkshop/">Machine Learning in Social Good Applications</a>, which was not a mistake (although I arrived too late to get a t-shirt in my size), as I <em>think</em> I had already seen the work from <a href="http://www.cs.columbia.edu/~blei/">David Blei's</a> talk present at the New York Academy of Sciences Machine Learning Symposium.</p>
<p>The name of the workshop got truncated to 'Computational Frameworks' on the sign outside, so I got to feel vaguely useful providing disambiguation services while trying to glimpse content. </p>
<p>The content I was most interested in (and managed to catch part of) was <a href="http://cs.mcgill.ca/~jpineau/">Joelle Pineau</a> speaking about <strong>Contextual Bandits for Effective Discovery of Personalized Adaptive Treatment Strategies</strong>. The focus here is on <em>adaptive</em> protocols, such as adaptive clinical trials or adaptive treatment strategies. In each case, earlier outcomes influence subsequent decisions: it's, you know, adaptive. The computational framework they use is the multi-armed bandit: you have a set of <em>K</em> actions with probabilistic outcomes. You don't know the outcomes or the probabilities, but you have to select actions to maximise some expected utility. This poses the classic exploration-exploitation trade-off so integral to sequential decision making. Once you discover an 'ok' action, do you choose it repeatedly (exploiting it), or do you attempt to find yet better actions, risking stumbling upon inferior outcomes (exploration)? This also raises questions about whether it's possible to explore 'safely', which was the subject of <a href="https://las.inf.ethz.ch/krausea">Andreas Krause's</a> keynote at AAAI this year. </p>
<p>Back to exploration-exploitation: In adaptive Bayesian trials, they use <a href="https://en.wikipedia.org/wiki/Thompson_sampling">Thompson Sampling</a>. This requires having a posterior over models, sampling one and selecting the action with highest expected utility relative to <em>that</em> model. So you act greedily given your belief (exploiting), but your belief is random (exploring). Another approach is to define an upper confidence bound <a href="http://homes.di.unimi.it/~cesabian/Pubblicazioni/ml-02.pdf">(Auer 2002)</a>, where you estimate the confidence of the estimate of the expected utility of an action using how many times the action has been tried, and select arms maximising the estimate + the confidence bound. In this way, you select actions which are either <em>very</em> good, decent and uncertain, or <em>very</em> uncertain. The third example in her slides is BESA: Best Empirical Sampled Average <a href="http://link.springer.com/chapter/10.1007/978-3-662-44848-9_8">(Baranski, Maillard, Mannor, 2014)</a>, which seems to involve subsampling the arm which has more data, then selecting the one with highest expected reward.</p>
<p>The specific application was <strong>cancer</strong>, specifically trying to minimise tumour volume in mice. They did a pure exploration phase, where mice with induced tumours had random treatments of combinations of two drugs (fluorouracil and imiquimod). They then considered the adaptive problem of selecting treatments given the current tumour size. This makes it a <em>contextual</em> bandit problem. They used Gaussian Processes to model the reward function over the space of continuous contexts (tumour sizes) and arms (discrete treatments). Then, given a specific context, you can select the arm maximising the expected reward, using these earlier-described methods. At this point there's a reference to Durand & Pineau 2015 for the GP extension of BESA but I somehow cannot find it. The idea seems to be to re-estimate the GP using a sub-sample of the data, then using that GP to estimate the maximum expected reward. Preliminary results using the adaptive approach look promising, and they're interested in doing sequential reinforcement learning (rather than bandits) in the future.</p>
<h2><a href="https://sites.google.com/site/icml2016data4goodworkshop/">Machine Learning In Social Good Applications</a></h2>
<p>I approximately made it to the <strong>Disease</strong> section of this workshop, which is unfortunate because I would have liked to see <a href="https://arxiv.org/abs/1606.06121">Quantifying and Reducing Stereotypes in Word Embeddings</a>, <em>Bolukbasi et al.</em> I'd consider this under the umbrella task of removing <em>unwanted</em> patterns from data, or perhaps more accurately, training a model such that it doesn't pick up on these patterns. See also 'racist algorithms' and this <a href="https://www.propublica.org/article/machine-bias-risk-assessments-in-criminal-sentencing">ProPublica piece on Machine Bias</a>. Will there be a conference summary where I don't mention Fairness, Accountability and Transparency in Machine Learning? Probably not.</p>
<p>Anyway, I have an especially strong memory of <a href="http://www.hanlab.science/">Barbara Han's</a> talk on <strong>Predicting Novel Tick Vectors of Zoonotic Diseases</strong>, possibly because it contained many horrifying images of ticks. This work is part a project to use <a href="http://www.caryinstitute.org/science-program/research-projects/machine-learning-predict-zoonotic-disease">machine learning to predict zoonotic diseases</a>, and also featured a (iirc) undergraduate researcher! The problem is basically: ticks act as disease vectors, but not all of them carry zoonoses. They mined entomological literature (and maybe other sources) to come up with feature sets for ticks, trained a supervised classifier (if I recall they used boosted regression trees), and predicted novel vectors. They also did some feature analysis to understand what differentiates these classes of tick. It turns out that a strong predictor is the number of hosts the tick feeds on. It seems like this could be confounded with the need to feed on a <em>specific</em> host (since that host has to be reservoir of the zoonosis), I asked and they hadn't done a breakdown looking at the specific species. Anyway, a straight-forward machine learning task but an important problem in ecology and epidemiology.</p>
<h2>A Rant about the Venue</h2>
<p>Times Square is the worst. Times Square is why people hate NYC. Tunnels should be built under Times Square so we never have to look at it. I acknowledge its utility to tourists and I reserve through gritted teeth some respect for their bloody-minded dedication to milling at junctions, drifting absent-mindedly across sidewalks, and stopping suddenly. I just don't enjoy being the person trying to weave between them on my way to lunch, especially when it's summer in NYC and I'm an inappropriately-attired Irishwoman. (We don't do 'direct sunlight' very well.)</p>
<p>I thought of some reasons to locate a conference on Times Square:</p>
<ul>
<li>the rest of the world has been destroyed<ul>
<li>Times Square stands alone in the void, a final stand for humanity against the encroaching oblivion</li>
<li>there is nothing left to do but hold conferences</li>
</ul>
</li>
<li>there are no other appropriate venues in New York City</li>
<li>conferences require a density of hotels only offered by Times Square</li>
<li>holding a conference in what is probably a <em>very</em> expensive hotel is a demonstration of power and status<ul>
<li>for... someone. ML researchers maybe? 😎</li>
</ul>
</li>
</ul>
<p>The venue itself was interesting because the conference was distributed across multiple floors. This meant lots of using the futuristic elevator system. I was involved in more than one 'what algorithm does this elevator system use' conversation. And hey, here's the <a href="https://webdocs.cs.ualberta.ca/~sutton/book/ebook/node111.html">chapter of the Sutton Reinforcement Learning book about Elevator Dispatching</a>. I wonder how many interesting methods have been developed to solve simple problems arising in the work environment of engineer/scientist types. I certainly used to think about the optimal road-crossing strategy when I lived in NYC (the problem is slightly interesting because east/west and north/south aren't symmetric due to differing block lengths and crossing times, so always going with the go sign isn't an optimal policy[citation required]).</p>
<p>The negative side-effect of this layout was (to me) a lack of general 'focal point' for the conference, especially since there were various other things going on in the hotel. (Excitingly, on the final day there was an Edward Tufte seminar on the <em>same floor</em> as us.)</p>
<p>TL;DR limit registrations to a number your venue can comfortably accommodate. Turning people away is sad (especially if they are, like me, students who only knew they were going once their workshop submission was accepted), but overcrowding is detrimental to good conferencing.</p>
<h2>In Conclusion</h2>
<p>Despite missing about half the conference between volunteering, working and being sick, I saw a lot of good work and had some great discussions with people. I'm a bit disappointed there was no proper closing ceremony with summary statistics like at NIPS (unless it was at the party on the Wednesday, which I spent coughing in my hotel room). The multi-track format makes it a little hard to get an overview of the broader field, ad there was a strange lack of closure on the last day. I'd say I'm looking forward to next year, but I <em>think</em>* it's going to be in Sydney, so we'll see about that.</p>
<p>*I don't know why I think this and I can't find any evidence supporting it. I did however learn that ICML also stands for:</p>
<ul>
<li>international conference on minority languages</li>
<li>international congress of medical librarians</li>
<li>international conference on chronic myeloid leukaemia</li>
<li>international conference on malignant lymphoma</li>
</ul>
<p>The more you know.</p>characterising treatment pathways at scale using the OHDSI network2016-06-15T00:00:00+01:002016-06-15T00:00:00+01:00corcratag:None,2016-06-15:biomed/2016-06-15-characterising-treatment-pathways-at-scale-using-the-ohdsi-network.html<p>This post is about the paper <a href="http://www.pnas.org/content/early/2016/06/01/1510502113.full">Characterizing treatment pathways at scale using the OHDSI network</a> from the hefty author list: <em>George Hripcsak, Patrick B. Ryan, Jon D. Duke, Nigam H. Shah, Rae Woong Park, Vojtech Huser, Marc A. Suchard, Martijn J. Schuemie, Frank J. DeFalco, Adler Perotte, Juan M. Banda …</em></p><p>This post is about the paper <a href="http://www.pnas.org/content/early/2016/06/01/1510502113.full">Characterizing treatment pathways at scale using the OHDSI network</a> from the hefty author list: <em>George Hripcsak, Patrick B. Ryan, Jon D. Duke, Nigam H. Shah, Rae Woong Park, Vojtech Huser, Marc A. Suchard, Martijn J. Schuemie, Frank J. DeFalco, Adler Perotte, Juan M. Banda, Christian G. Reich, Lisa M. Schilling, Michael E. Matheny, Daniella Meeker, Nicole Pratt, and David Madigan</em>.</p>
<p>Let's have at it. <em>Note: including figures is needlessly time-consuming for me, so I'm going to refer to the paper assuming you have it to hand.</em></p>
<h3>tl;dr</h3>
<p>They looked at which medications patients received, for one of three diseases (type 2 diabetes, hypertension, depression), considering sequences of medications. Diabetes treatment is mostly dominated by metformin, and there is more variation for the other diseases. Many patients only ever receive metformin. They break it down by medical centre and find hetereogeneity between centres (and thus countries). Heterogeneity suggests we attempt to generalise with care.</p>
<h3>What is OHDSI?</h3>
<p>Pronounced 'Odyssey', OHDSI is the Observational Health Data Sciences and Informatics collaboration. From <a href="http://www.ohdsi.org/">the website</a>, 'OHDSI has established an international network of researchers and observational health databases with a central coordinating center housed at Columbia University.' I was shamefully unaware of its existence, despite it being very relevant to my interests. Evidence-based medicine through data analaysis! International collaboration! Open source! Reproducibility! All great. Fawning section over, on to the contents of the paper.</p>
<h3>What did they do?</h3>
<p>They analysed data from the OHDSI collection of databases to look at <em>treatment pathways</em> (ordered sequences of <em>medications</em> given to a patient) for three diseases: hypertension, diabetes mellitus type 2, and depression. Details in subsequent sections.</p>
<h3>Why did they do it?</h3>
<p>This feels like a proof-of-concept paper to me. The concept being that large-scale collaborations involving multiple health centres are possible, and that insights can be gained from analysis of the data. Essentially, the mission of OHDSI. More specifically, supporting the use of <em>observational data</em> to supplement medical research, which classically relies heavily on clinical trials. Observational data is 'free' in a sense (data-collection and storage, privacy-violating concerns <em>temporarily</em> aside), can cover wider populations and goes on indefinitely. Exploiting that has clear benefits. They highlight three key areas of benefit:</p>
<ol>
<li>Identifying which current therapies should be compared with a new therapy (for experimental design)</li>
<li>Testing clinical hypotheses on observational data (acknowledging the need to do the appropriate statistical modelling)</li>
<li>Understanding population characteristics to aid in extrapolation of results (both observational and experimental)</li>
</ol>
<p>This study focuses mainly on the first point, as the look at medication trends.</p>
<h3>Data resources</h3>
<p>OHDSI, at the time of writing, has 52 databases containing 682 million patient records. For this study they used 11 databases with 250 million records. I don't know why they didn't use all the data. These databases were: (this is Table 2)</p>
<ul>
<li>AUSOM (Ajou University School of Medicine, Korea)</li>
<li>CCAE (MarketScan Commerical Claims and Encounters, I guess USA)</li>
<li>CPRD (UK Clinical Practice Research Datalink)</li>
<li>CUMC (Columbia University Medical Centre, USA)</li>
<li>GE (General Electric Centricity, I guess USA)</li>
<li>INPC (Regenstrief Institute, Indiana Network for Patient Care, USA)</li>
<li>JMDC (Japan Medical Data Center)</li>
<li>MDCD (MarketScan Medicaid Mult-state, USA)</li>
<li>MDCR (MarketScan Medicare Supplement and Coordination of Benefits)</li>
<li>OPTUM (Optum ClinFormatics, I guess USA)</li>
<li>STRIDE (Stanford Translational Research Integrated Database Environment, USA)</li>
</ul>
<p>So that's one from the UK, one from Japan, one from Korea and eight from the USA. The biggest population by far was CCAE, which contributed 119 million patients. Japan and Korea only comprised 5 million patients together, and the UK 11 million, so <em>most</em> of these patients are in the USA.</p>
<p>The databases have various types of data in them, which is of great interest to me, but in this study they just extracted medications.</p>
<h3>Data processing</h3>
<h4>Filtering for patients</h4>
<p>So: which patients did they include in the analysis? </p>
<p>Patients had to satisfy:</p>
<ul>
<li>≥ 4 continuous years in the database<ul>
<li>≥ 1 year <em>before</em> any treatment for that disease</li>
<li>≥ 3 years of continuous treatment after that (this means patients who died during the period were excluded)</li>
</ul>
</li>
<li>≥ 1 diagnosis code for corresponding disease</li>
<li>0 diagnosis codes for <em>excluded</em> diagnoses (these were: pregnancy for all, diabetes type 1 for diabetes type 2, and bipolar 1 disorder or schizophrenia for depression)</li>
</ul>
<p>This resulted in 1,182,792 hypertension patients, 327,110 diabetes patients, 264,841 depression patients. I'm not sure what the breakdown by centre was.</p>
<p>Excluding patients who died during that period seems problematic to me, because that's <em>probably</em> not a random event. I worry about excluding subpopulations with more aggressive forms of the disease, or excluding <em>badly-treated</em> patients (although that's slightly outside the scope of this paper I think, but is a question of particular interest to me). The phenotype here is already incredibly broadly defined - what if the observed heterogeneity in treatment pathways is due to such subpopulations? I'm not sure what a better approach here would have been, though - exclude patients who died of reasons <em>unrelated</em> to the disease, perhaps?</p>
<h4>Data standardisation</h4>
<p>Diagnoses were defined by mapping SNOMED (Systematized Nomenclature of Medicine) and Medical Dictionary for Regulatory Activities to ICD-9-CM (International Classification of Diseases, ninth revision, clinical modification).
Medications were defined by their ingredients using RxNorm, and grouped according to classification hierarchies (such as, they state, Anatomical Therapeutic Chemical classification and First Data Bank's terminology).
I'm not especially familiar with these ontologies, except for SNOMED. Most of what I've done to date involved UMLS (which contains SNOMED and possibly everything else that has existed).</p>
<h4>Constructing medication sequences</h4>
<p>Having filtered to these patients they queried the OHDSI databases for the sequences of medications for these patients. Some notes on this:</p>
<ul>
<li>sequences were limited to a maximum of 20 medications</li>
<li>if a patient switched from one medication and then later back to it, only the first exposure was recorded</li>
<li>combination medications (with multiple active ingredients) were treated as prescriptions of multiple single-ingredient medicines</li>
<li>I don't think the time between medications is considered - they're just ordered sequences of drugs</li>
</ul>
<p>Having defined these sequences, they then counted the numbers of patients with each sequence and did other analyses. For example, they looked at medication <em>classes</em>, which are listed in table 1.</p>
<h3>What did they find?</h3>
<p>Also known as: let's look at the figures!</p>
<h4>Figure 2</h4>
<p><em>Which drugs do patients get <em>first</em>? Is there a standard entry into treatment-for-disease?</em></p>
<p>For diabetes, it seems yes. 76% of patients start with metformin. For hypertension, hydrochlorothiazide is <em>sort of</em> most popular (I am squinting at the figure), and in depression citalopram is also <em>sort of</em> most popular, but there's no clear winner. This is where I wonder about subpopulations. The immediate questions are: what's different about these patients? Why did they receive a different first medication? Does it vary by centre (yes - see figure 3)? By other diagnoses? Age? So many variables to consider! (I realise that this paper cannot answer all of these questions and I'm not criticising it - the results just inspire further research.)</p>
<p><em>Do patients stay on a single drug?</em></p>
<p>For diabetes, 29% of patients took <em>only</em> metformin. For hypertension, 6.44% took only lisinopril. For depression, 5.18% took only citalopram. Once again I wonder what this means. Was this medication especially effective for them, and if yes why? We see the potential for this large-scale observational data to shed light on differences in response to therapy that might be missed on the smaller-scale of a clinical trial. Maybe.</p>
<p><em>Unique treatment pathways?</em></p>
<p>Some patients are unique in the entire dataset: 10% of diabetes patients, 24% of hypertension patients, 11% of depression patients have unique treatment pathways. Clearly doing a nearest-neighbour treatment recommendation approach would fail for these patients, although I wonder if these patients may simply have rather <em>long</em> sequences of medications? It might be in the supplemental data, but I wonder what the distribution of sequence length is.</p>
<h4>Figure 3</h4>
<p>This is figure 2 but broken down by data centre, for some samples. We see immediately that metformin is less popular in the Japanese database than in the UK or US examples shown. I think the overall gist of this figure is that there is between-centre heterogeneity, and also (as in Figure 2) heterogeneity in the choice of second-line drugs. You could definitely look deeper into this data (hence my feeling that this paper is a proof of concept), but there is a risk (as always) of wading around without a clear hypothesis.</p>
<h4>Figure 4</h4>
<p>The y-axis here is a fraction of patients in the population. The fraction of interest is given by the lettering. x-axis is time, so we're looking at medicating trends.</p>
<ul>
<li><em>A</em>: patients on monotherapy: this became somewhat more popular</li>
<li><em>B</em>: patients on monotherapy which is the <em>most popular monotherapy</em> for that diesase: the medication is listed with the disease now (so this is a subset of the patients in <em>A</em>)</li>
<li><em>C</em>: patients whose first medication started with the <em>most popular starting medication</em> for that disease (not necessarily most popular monotherapy)</li>
</ul>
<p>The conclusion from B is that monotherapy in diabetes is somewhat dominated by metformin, whereas in hypertension and depression there is more variation.</p>
<p>I don't know how they decided which drug was most popular - is this over all patient trajectories over all time (I suspect yes)? It seems unlikely but the apparent absence of a dominant monotherapy in hypertension and depression <em>could</em> be explained by a strong bias towards some drugs being popular at some times: so at any moment in time there <em>is</em> a dominant monotherapy, but because its identity is always changing, it goes undetected by this analysis. Or more similarly, there <em>is</em> a dominant monotherapy, but it's not lisinopril/sertraline. Would this be an interesting finding? Perhaps. Discovering that medication practices are highly influenced by trends could be a cause for concern. Equally, finding that medication practices lag (between centres or behind research) could also be concerning. Or heartening. Who knows.</p>
<h4>Figure 5</h4>
<p>This is figure 4 but now the data series corespond to data <em>centre</em>, and the different diseases get their own graphs. They bind the y axes together across rows, so there are inset graphs to give the zoomed-in views. Mmm, data visualisation.</p>
<p>There's so much going on here that looking at this figure fills me with vague dread. We have the potential to learn how data centres vary in their medicating trends.</p>
<p>Gravitating towards the most extreme-looking data series, something is going on in STRIDE (US) for monotherapy. 100% of diabetes patients in 2004 were on metformin? This is also when this database appears to begin, so I guess something strange was going on (like only data from diabetes patients on metformin was being recorded, or something)...</p>
<p>The authors draw attention to the lack of consistent bias between use of EHR data and claims data in what they report. This is potentially very interesting, because claims data is somewhat more 'available' from what I can tell (people seem to be publishing more with claims data[citation required]), but is biased towards billing (obviously) and less 'rich' than a full EHR. Being able to use claims data as a proxy for EHR would be good and useful. <em>However</em>, the analyses here draw on medication information, which is <em>probably</em> well covered by claims data, so the finding is <em>probably</em> less striking.</p>
<h4>Figure 6</h4>
<p>Once again, we see a fraction of something on the y-axis, with time on the x-axis. In this case, it's the fraction of medication <em>changes</em> in that year which were <em>within the same structural class</em> (these classes are <em>not</em> fully listed in table 1, and are definitely in the supplemental information). </p>
<p>I am not sure what to conclude from this figure. Do different strutural classes correspond to very different mechanism of action for the drug? Would changing structural class mean the doctor believes the patient's disease to be characterised differently? I am not a doctor (as might be obvious) and I'm cancer-focused so I'm speculating wildly here. There isn't much discussion of this figure in the main paper. Not much of a trend is observed, anyway.</p>
<h3>Conclusion</h3>
<p>I reiterate my feeling that this is a proof of concept paper, or possibly a paper to advertise the <em>seemingly incredibly amazing</em> data resource OHDSI is creating. There aren't really any hypotheses tested in this work, and I don't come away from it with a strong conclusion beyond 'heterogeneity exists'. Then again, I came into this paper with little by way of prior expectation for the findings. </p>
<p>There are some further avenues of research (some of which I mentioned in this blog post) prompted by this study, but whether they're truly worth pursuing requires further thought, as ever. And I'm definitely going to check out what else OHDSI is up to.</p>play me a match of doto for your heart2016-06-11T00:00:00+01:002016-06-11T00:00:00+01:00corcratag:None,2016-06-11:life/2016-06-11-play-me-a-match-of-doto-for-your-heart.html<p>Here are some strange messages I have received on OKCupid.</p>
<h3>???</h3>
<ul>
<li>you are evil // Sorry you do not you're Sorry</li>
<li>hi // how are you? // what did you mean with that you are dog person</li>
<li>Hi. How are you? Please I need a favor</li>
<li>Hey bitch, are you studying computer science? <em>(this …</em></li></ul><p>Here are some strange messages I have received on OKCupid.</p>
<h3>???</h3>
<ul>
<li>you are evil // Sorry you do not you're Sorry</li>
<li>hi // how are you? // what did you mean with that you are dog person</li>
<li>Hi. How are you? Please I need a favor</li>
<li>Hey bitch, are you studying computer science? <em>(this is probably the
closest thing to 'abuse' I have received on the site)</em></li>
<li>I love dogs tho</li>
<li>All of which are American dreams comrade</li>
<li>MY GOD YOU HAVE A FACE // Sorry, was that rude? Is it rude to tell a
woman she has a face?</li>
</ul>
<h3>people respond to my profile</h3>
<p>The context here is that I write very small pieces of speculative
fiction in the 'explanation' box for my questions. Someone asked if they
were Cormac McCarthy quotes once, which may be my greatest achievement.
I've also gotten a few messages written in the same style as my
responses. Dating site as platform for collaborative fiction-writing,
anyone?</p>
<ul>
<li>I could not and still can not tell if your page is a real dating
profile or just a place to either copy and paste or write original
satire</li>
<li>I have an incredible amount of respect for your commitment to
this bit.</li>
<li>five stars for FUCKING TERRIFYING OH MY GODDDDDDDDDDDD</li>
<li>
<p>are you a Turing test?</p>
</li>
<li>
<p>play me a match of doto for your heart <em>(amazing)</em></p>
</li>
<li>Ayyy gurl, no need to get a BKB cuz my love is pure.</li>
</ul>
<p>Never change, internet.</p>moved to pelican2016-05-17T00:00:00+01:002016-05-17T00:00:00+01:00corcratag:None,2016-05-17:meta/2016-05-17-moved-to-pelican.html<p>Here's what happened:</p>
<p>My phone started acting up. The lock button turned into a 'maybe turn the phone off' button. The unlock button turned into a 'maybe turn the phone off, <em>or</em> open the camera?' button. I impulse-purchased a new phone, and the old one magically fixed itself. New phone …</p><p>Here's what happened:</p>
<p>My phone started acting up. The lock button turned into a 'maybe turn the phone off' button. The unlock button turned into a 'maybe turn the phone off, <em>or</em> open the camera?' button. I impulse-purchased a new phone, and the old one magically fixed itself. New phone went into a box and my SIM remained micro-sized for a little longer.</p>
<p>I moved to Switzerland, got a nano SIM, started dual-wielding phones. New phone for new SIM, old phone for everything else. I migrated my apps to new phone (this was surprisingly tricky and there's an entire story in there about me conveniently being in the USA to receive a single text message, but it's a tangent), so I got a new Signal fingerprint. (Then my old phone bricked itself, as they do.)</p>
<p>I went to put my new Signal fingerprint on my lovely SSLy Github-pages website and noticed it was broken. For how long this was the case I don't know. I think it was a Jekyll update? Who knows. The time had come. I'd been thinking of leaving gh-pages for a while, so this was a good excuse.</p>
<p>Reasons for wanting to leave:</p>
<ul>
<li>using plugins with Jekyll and gh-pages is mildly painful</li>
<li>the solution, and/or Jekyll itself was <em>increasingly frustratingly slow</em></li>
<li>gh-pages was too mysterious</li>
</ul>
<p>and the new reason:</p>
<ul>
<li>website was mysteriously broken</li>
</ul>
<p>These are probably fixable, I am sure. Maybe my solution isn't the best, but it's mine. I decided to: <strong>move from Jekyll to <a href="link to pelican">Pelican</a></strong> and <strong>host my site myself</strong>. By the time you're reading this, I'll have achieved that second part. At the time I'm writing it, I haven't even started.</p>
<p>Why did I do this?</p>
<ul>
<li>Jekyll uses Ruby, Pelican uses Python, I know Python a <em>lot</em> better than Ruby</li>
<li>I never knew Jekyll very well, so there were no temptingly sunk costs to care about</li>
<li>I saw a site using Pelican during an impressionable moment</li>
<li>self-hosting (in a VPS, let's not be unreasonable) affords a level of control that I apparently want</li>
</ul>
<p>So, this site now looks <em>rather different</em>. That's because another thing happened: I realised that I'm not a front-end web developer, or designer, or basically a person who has touched HTML since she was making Pokémon fansites as a ten-year-old. But I'd also like my site to look good. The old version, [which I should screenshot for posterity] was my first adventure into CSS and was unsurprisingly minimalist. I got some compliments on the design of it (yay!) but it was very hand-crafted and it looked it. </p>
<p>Now I am balancing competing desires: a site which <strong>looks good</strong> (and works well), and a site which is <strong>my creation</strong>. The solution for now is to use an existing Pelican theme, made by someone who presumably knows a lot more about websiting than I do, and modify it to my own purposes. Apparently the one I picked was intended to look like <a href="...">Medium</a> so now after several hours of mucking around I have a Medium blog with no features. Excellent. </p>
<p>I'm modifying the theme (see <a href="https://github.com/corcra/medius">my fork</a>) and I will continue to do so until I get distracted by <a href="http://www.internationalphoneticalphabet.org/ipa-sounds/ipa-chart-with-sounds/">something else</a>.</p>
<p><em>This post brought to you by an internet outage at the AirBnB I currently live in.</em></p>installing tmux locally2016-03-13T00:00:00+00:002016-03-13T00:00:00+00:00corcratag:None,2016-03-13:tips/2016-03-13-installing-tmux-locally.html<p>I have been setting myself up on a new computing cluster (CentOS 6.7), so I'm in the lovely land of installing things without root. <code>tmux</code> proved a bit frustrating, so here's what I ended up doing:</p>
<h2>install libevent</h2>
<p><code>tmux</code> needs this, I didn't have it (you <em>might</em>, so try …</p><p>I have been setting myself up on a new computing cluster (CentOS 6.7), so I'm in the lovely land of installing things without root. <code>tmux</code> proved a bit frustrating, so here's what I ended up doing:</p>
<h2>install libevent</h2>
<p><code>tmux</code> needs this, I didn't have it (you <em>might</em>, so try installing <code>tmux</code> first). Grabbed it from the repository, then:</p>
<div class="highlight"><pre><span></span>$ git clone https://github.com/libevent/libevent
$ cd libevent
$ ./configure --prefix=$HOME
$ make
$ make verify # this failed for me, oh well
$ make install
</pre></div>
<p>Choose your <code>prefix</code> as you desire.</p>
<p>Now <code>libevent</code> should be installed in <code>$HOME</code>. Easy y0.</p>
<h2>install tmux</h2>
<p>Git all the things.</p>
<div class="highlight"><pre><span></span>$ git clone https://github.com/tmux/tmux
$ cd tmux
$ zsh autogen.sh
</pre></div>
<p>Now for the thing which was <em>required to make everything work</em>, a slightly augmented version of the <a href="http://unix.stackexchange.com/a/17918">winning answer</a> from <a href="https://unix.stackexchange.com/questions/17907/why-cant-gcc-find-libevent-when-building-tmux-from-source">this Stack Exchange post</a>...</p>
<div class="highlight"><pre><span></span>$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/lib # possibly optional, see below
$ DIR=$HOME
$ ./configure CFLAGS="-I$DIR/include" LDFLAGS="-L$DIR/lib" --prefix=$DIR
</pre></div>
<p>Obviously I could have used <code>$HOME</code> there instead of <code>$DIR</code>, but I am staying consistent.</p>
<div class="highlight"><pre><span></span>$ make
$ make install
</pre></div>
<p>And everything should Just Work now. This probably shouldn't have posed the difficulty that it did, but I'm a scientist, not a sysadmin.</p>
<h2>final thing</h2>
<p>Does the <code>LD_LIBRARY_PATH</code> line seem redundant to you? It seems redundant to me, but I had to add it to my <code>.zshenv</code> (or, try <code>.bashrc</code>) after this to get <code>tmux</code> to continue working. May or may not have been necessary during installation (what with all that redundancy) but I'm not going to uninstall just to check, because tmux is <em>actually working</em> and if I look at it too closely it will <em>definitely break</em>.</p>AAAI 2016 by the day2016-02-17T00:00:00+00:002016-02-17T00:00:00+00:00corcratag:None,2016-02-17:ml/2016-02-17-aaai2016.html<p>I started writing this in Phoenix airport, so if the <a href="ml/2015-12-14-nips2015.html">current trend</a> (n=2) continues, I'll start recounting my next conference half-way through, with interesting implications for the latter half of the post. This was my first time attending the Association for the Advancement of Artificial Intelligence Conference <a href="https://www.aaai.org/Conferences/AAAI/aaai16.php">(AAAI)</a>, so …</p><p>I started writing this in Phoenix airport, so if the <a href="ml/2015-12-14-nips2015.html">current trend</a> (n=2) continues, I'll start recounting my next conference half-way through, with interesting implications for the latter half of the post. This was my first time attending the Association for the Advancement of Artificial Intelligence Conference <a href="https://www.aaai.org/Conferences/AAAI/aaai16.php">(AAAI)</a>, so I made sure to spend most of it comparing it to NIPS. I stopped taking notes towards the end, so this coverage is a bit skewed.</p>
<h2>Thursday</h2>
<p>Shameless plug for a great vegan restaurant in Phoenix: <a href="http://greenvegetarian.com/">Green</a>. I would have eaten there a lot more if it were a bit closer to the conference centre. I ended up going to <a href="http://www.veganhouseaz.com/">Vegan House</a> a few times. A fair runner up in the list of Best Vegan(-ish) Restaurants in Downtown Phoenix (there are two).</p>
<h2>Friday</h2>
<p>Shortly before dawn, it became cold enough to sleep. I appreciated the vastness of the Arizona sky and the eerie absence of fellow pedestrians as I relocated to my downtown hotel. Coming from Dublin and then New York City, I find empty paths unsettling, especially coupled with wide roads and low buildings. I passed by a man selling paintings of owls from a rucksack, and order was restored.</p>
<p>Friday and Saturday of the conference were tutorial/workshop days (the distinction between these categories is not clear). On Friday morning I went to...</p>
<h3><a href="https://www.cs.cmu.edu/~sandholm/organExchangeTutorials/organExchangeTutorial.aaai16.html">Organ Exchanges: A Success Story of AI in Healthcare: John Dickerson and Tuomas Sandholm</a></h3>
<p>I'd seen John Dickerson speaking at the <a href="https://sites.google.com/site/nipsmlhc15/">NIPS 2015 Workshop on Machine Learning in Healthcare</a> (some thoughts on MLHC in my <a href="https://corcra.github.io/ml/2015/12/14/NIPS2015.html">NIPS 2015 post</a>), so I was already somewhat familiar with this work. I think he's a good speaker, so even though this topic is not <em>entirely</em> relevant to me, I figured I'd get something out of the tutorial. This was true to some extent - my attention started to flag at some point into what was essentially a 3.5 hour lecture.</p>
<p>The link to the slides is above and <a href="https://www.cs.cmu.edu/~sandholm/organExchangeTutorials/organExchangeTutorial.aaai16.html">here</a>, so I will just outline the main idea and skip the algorithmic details.</p>
<p>Kidney exchanges: you need a kidney, and a family member/friend/loved one is willing to donate one. Unfortunately, they may not be compatible. The solution is to 'trade' donors with someone else: "I'll give you my mother's kidney for your girlfriend's kidney", or, "I'll give you my mother's kidney so your girlfriend can give her kidney to that other person, and their friend can give <em>me</em> their kidney", and so on. This amounts to finding cycles in a graph (the second example being a 3-cycle), which brings us into the wonderful world of combinatorial optimisation. The exchange actually requires everyone to go under the knife at the same time (something about trading organs I don't quite recall), so there are physical and logistical limits on the length of the cycle.</p>
<p>They mentioned some other barter-exchange markets, such as</p>
<ul>
<li>holiday homes (<a href="www.intervac-homeexchange.com/">intervac</a>)</li>
<li>books (<a href="http://www.paperbackswap.com/index.php">paperback swap</a>, <a href="http://www.bookcrossing.com/">book crossing</a>)</li>
<li>odd shoes (<a href="http://www.oddshoe.org/">national (US) odd shoe exchange</a>)</li>
</ul>
<p>These are neat. People exchanging used items instead of buying new/throwing away is obviously great, and I approve of anyone supporting such efforts. It's what the 'sharing economy' should have been... and now back to organs.</p>
<p>An interesting (and amazing!) thing can happen in these kidney exchanges: sometimes an altruistic donor will show up; someone who just has too many kidneys and wants to help out. These produce 'never-ending altruistic donor' chains ("a gift that gives forever"), and have apparently become more important than cycles for the kidney-matching problem.</p>
<p>I zoned out of the tutorial for a bit to discuss the feasibility of simultaneous translation, prompted by this article: <a href="http://www.wsj.com/articles/the-language-barrier-is-about-to-fall-1454077968">The Language Barrier is About to Fall</a>. My gut reaction is to say 'it's too hard', but that's motivated by my enjoyment of learning languages - part of me (selfishly) doesn't <em>want</em> this problem solved. I'm however learning to temper my skepticism when it comes to what machine learning can achieve, and we're actually getting pretty good at translation (for <em>some</em> language pairs) so I'm pretty optimistic about this. And breaking language barriers, if it can be done cheaply, could be immense. I emphasize the relevance of cost because I see language most prohibitive not for holiday-goers but for migrants, who may not have the resources to buy a <a href="https://en.wikipedia.org/wiki/List_of_races_and_species_in_The_Hitchhiker's_Guide_to_the_Galaxy#Babel_fish">babelfish</a>.</p>
<p>There are a lot of subtleties to consider in the kidney exchange problem, and much work has been done: see the slides.</p>
<p>They concluded the tutorial with a discussion of other organ exchanges. Kidneys are sort of 'easy' because the cost to the donor is quite minimal, unlike in e.g. lung exchanges where the donor's quality of life (and life expectancy) are impacted. One can also do living donor liver exchanges, where some <em>fraction</em> of the donor's liver is removed. There are essentially no altruistic donors here. Dickerson suggested combining multiple organs, so you thread a liver and kidney chain together. Perhaps a kidney patient's donor would be willing to donate liver to someone whose donor would give a kidney, and so on.</p>
<p>My plan was to go to <a href="http://www.inf.kcl.ac.uk/staff/danmag/aaai16tutorial_aips.html"><strong>AI Planning and Scheduling for Real-World Applications</strong> (Steve Chien and Daniele Magazzeni)</a> in the afternoon, but I made the mistake of being outside for slightly too long during lunch, and I spent the rest of the afternoon recovering in a dark and cool hotel room. Irish people: handle with care, keep out of direct sunlight.</p>
<h3>Student Welcome Reception</h3>
<p>One really nice thing about AAAI was the student activities. Being a student at a conference can be bewildering: there are so many people who seem to know each other, talking about things they seem to know about! I was also there by myself (my group does not typically attend AAAI), so the icebreakers they ran saved me from spending the rest of the conference lurking in corners and hissing at people.</p>
<p>The actual ice-breaker activity was weird (although seemingly effective): we had to take photographs with a AI/AAAI/Phoenix theme (artificially intelligent <em>fire</em>, maybe) featuring ourselves. A ploy to get pictures for a website? Possibly. We never did find out who won the fabled prize.</p>
<h2>Saturday</h2>
<p><img src="images/aaai2016_01.png" class="floatl" style="width: 24vw;"></p>
<p>Excluding a brief foray into the tutorial about 'Learning and Inference in Structured Prediction Models', and fruitless wandering in search of coffee shops open on a Sunday, I spent much of the day at...</p>
<h3><a href="https://www.cse.unsw.edu.au/~tw/aiethics/AI_Ethics/Introduction.html">Workshop on AI, Ethics, and Society</a></h3>
<p>This workshop had overlap in content/speakers/organisers with the 'Algorithms Among Us' symposium at NIPS 2015 (some thoughts <a href="https://corcra.github.io/ml/2015/12/14/NIPS2015.html">here</a>). My interests might be obvious by now.</p>
<p>This was an interesting workshop. There was a mix of machine learners, AI researchers, (possibly) philosophers and miscellaneous other. There were fewer arguments than I would have expected. It's not that that I particularly <em>wanted</em> to see (verbal) fighting, but people seem quite passionate about, e.g. whether or not The Singularity is something to worry about, so I expected more gloves on the floor.</p>
<p>People are concerned about dangerous (powerful) AIs - how do we ensure they don't enslave us all in pursuit of paperclip-making? Do we have moral responsibility towards them? Should they feel pain? Should we be allowed to turn them off, once they're active/alive(?)? Are simulations of humans humans? These were some questions raised.</p>
<p>Some more, uhh, <em>short-term</em> concerns included the risks of adversarial machine learning, the effects of AI on labour markets (more on this later), the difficulty of measuring progress towards AGI, and enough other things that I didn't leave the workshop thinking <em>everyone</em> is feeling Existentially Threatened. I certainly am not. </p>
<p>I'm glad some people are thinking about long term threats (diversity of tactics!), but I am much more worried about the present and near future. AI (rather machine learning) already influences people, in potentially <a href="http://arstechnica.co.uk/security/2016/02/the-nsas-skynet-program-may-be-killing-thousands-of-innocent-people/">irreversibly life-altering ways</a> (to put it mildly), and I fear the technology is becoming integrated into society faster than anyone can measure its harm (see also: vaping). It's also quite easy for us as researchers to pretend our work is apolitical, that we simply explore and create things, blissfully ignorant of negative consequences should our creations be <em>misused</em>. Positive applications presumably motivate much great work, and I don't wish that people <em>stop</em> this work, necessarily. We just need to acknowledge that we cannot <i>un</i>-discover things, and that people who don't understand the limitations of technology may still use it. </p>
<p>I am meandering to a point: efforts such as the <a href="https://www.stopkillerrobots.org/">Campaign to Stop Killer Robots</a> are good and should be publicised and discussed. Perhaps the <a href="http://www.ucsusa.org/">Union of Concerned Scientists</a> should start thinking about 'algorithmic/autonomous threats' (to human lives, livelihoods and the environment). My ideas here are half-formed, which is all the more reason I'd like to see discussions about such issues at similar workshops. It's certainly important that AIs have ethics, but what about the ethics of AI <em>researchers</em>?</p>
<h2>Sunday</h2>
<p>The conference begins in earnest!</p>
<h3>Steps Toward Robust Artificial Intelligence - Thomas G. Dietterich</h3>
<p>Quantifying our uncertainty (as probabilistic approaches to AI attempt to do) is about <em>known unknowns</em>: rather, the thing we know we are uncertain about has to appear somewhere in the model. Dietterich drew attention to <em>unknown unknowns</em>: things outside the model, perhaps outside our algorithm's model of the environment.</p>
<p>One way to tackle this is to expand the model: keep adding terms to account for things <a href="https://xkcd.com/793/">we just thought of</a>. A risk of this is that these terms may introduce errors if we mismodel them. He suggested that we instead build <em>causal models</em>, because causal relations are more likely to be robust, require less data and transfer to new situations more easily.</p>
<p>Regarding new situations: what happens if at 'test' (deployment, perhaps) time, our algorithm encounters something wildly different to what it has seen before? Perhaps instead of allowing it to perform suboptimally (and worse still, to not know it is performing badly), it should recognise this <em>anomaly</em> and seek assistance. This prompts an open question, "when an agent decides it has entered an anomalous state, what should it do? Is there a general theory of safety?"</p>
<h3>Session: Learning Preferences and Behaviour</h3>
<p>I'll not lie: I went to this session because it sounded creepy in a Skynet, Minority Report sort of way.</p>
<p>My favourite talk of the session was <a href="https://www.aaai.org/Conferences/AAAI/2016/Papers/03Evans12476.pdf">Learning the Preferences of Ignorant, Inconsistent Agents</a> - <em>Owain Evans, Andreas Stuhlmueller and Noah D. Goodman</em>. Roughly, they are concerned with inverse reinforcement learning (IRL) (so learning utility/reward functions) from <em>suboptimal</em> agents, as humans often might be. A specific case they look at is time inconsistency, which is where agents make plans they later abandon. Seemingly any non-exponential discounting implies time-inconsistency, if my notes are correct. See paper for details. And a related project page: <a href="http://agentmodels.org/">agentmodels.org</a></p>
<p>I spent the early afternoon finishing up my 'plain English explanation' for the work I was presenting at AAAI, see the page <a href="https://corcra.github.io/bf2/">here</a>. I wanted to have something to point my family/friends at when they ask what I work on. Also, making science accessible is good, probably.</p>
<h3>Session: Word/Phrase Embedding</h3>
<p>I went to this because I was speaking (briefly) at it. Also, because it is relevant to my interests, so I'll list everything.</p>
<p>The oral spotlights:</p>
<ul>
<li><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/15Sun11783.pdf">Inside Out: Two Jointly Predictive Models for Word Representations and Phrase Representations</a> - <em>Fei Sun, Jiafeng Guo, Yanyan Lan, Jun Xu and Xueqi Cheng</em>: Modification of the word2vec-style skip-gram/continuous-bag-of-words model including morphology, project page: <a href="http://ofey.me/projects/InsideOut/">InsideOut</a>.</li>
<li><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/15Wick12464.pdf">Minimally-Constrained Multilingual Embeddings via Artificial Code-Switching</a> - <em>Michael Wick, Pallika Kanani and Adam Pocock</em>: using artificial code-switching to help rapidly create multilingual tools, borrowing information across languages essentially.</li>
<li><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/12Derczynski11779.pdf">Generalised Brown Clustering and Roll-Up Feature Generation</a> - <em>Leon Derczynski and Sean Chester</em>: I am shamefully ignorant about Brown clustering, so a lot of this was lost on me. <a href="https://github.com/sean-chester/generalised-brown">Link to project repository, anyway.</a></li>
</ul>
<p><a href="https://github.com/corcra/bf2/tree/master/media"><img src="https://raw.githubusercontent.com/corcra/bf2/master/media/aaai_spotlight_p2.png" class="floatr" style="width: 25vw;"></a></p>
<p>The poster spotlights:</p>
<ul>
<li><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/15Zhang12227.pdf">Building Earth Mover's Distance on Bilingual Word Embeddings for Machine Translation</a> - <em>Meng Zhang, Yang Liu, Huanbo Luan, Maosong Sun, Tatsuya Izuha and Jie Hao</em>: I may have spent this spotlight worrying about my spotlight.</li>
<li><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/14Hyland12446.pdf">A Generative Model of Words and Relationships from Multiple Sources</a> - <em>Stephanie L. Hyland</em> (that's me) , <em>Theofanis Karaletsos and Gunnar Rätsch</em>: People seemed to like the slides I made for this spotlight, so I put them in the project repository with some other 'media', see <a href="https://github.com/corcra/bf2/tree/master/media">here</a>.</li>
<li><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/14Goikoetxea11777.pdf">Single or Multiple? Combining Word Representations Independently Learned from Text and WordNet</a> - <em>Josu Goikoetxea, Eneko Agirre and Aitor Soroa</em>: work in a similar vein to mine, in the sense of combining information from 'free text' and 'structured data' (in this case WordNet).</li>
</ul>
<h3>From Proteins to Robots: Learning to Optimize with Confidence - Andreas Krause</h3>
<p>Some interesting and important questions:</p>
<ul>
<li>how can an AI system autonomously explore while guaranteeing <em>safety?</em></li>
<li>how can we do optimised information gathering?</li>
</ul>
<p>The former question is quite important for 'learning in the wild', and moving beyond the existing (rather successful) paradigm of test/train/validation that we have in machine learning - what happens when the data the algorithm sees depends on actions it takes?</p>
<p>The latter is quite interesting for cases where we want to probe some nearly-black-box system, but probing is expensive. One can use the framework of <em>Bayesian Optimisation</em> (Močkus, 1978), and score possible locations (to probe) by their utility in resolving the exploration/exploitation trade-off (via some kind of acquisition function, of which many have been proposed).</p>
<p>He discussed how one can use Gaussian processes and confidence bounds to help with this, and I'll include a pointer to <a href="http://arxiv.org/abs/0912.3995">Srinivas et al, 2010.</a></p>
<p>Some more paper pointers:</p>
<ul>
<li><a href="http://colt2008.cs.helsinki.fi/papers/80-Dani.pdf">Stochastic Linear Optimization under Bandit Feedback</a> - Varsha Dani, Thomas P. Hayes, Sham M. Kakade</li>
<li><a href="https://las.inf.ethz.ch/files/gotovos13active-long.pdf">Active Learning for Level Set Estimation</a> - Alkis Gotovos, Nathalie Casati, Gregory Hitz, Andreas Krause</li>
<li><a href="http://jmlr.org/proceedings/papers/v37/sui15.pdf">Safe Exploration for Optimization with Gaussian Processes</a> - Yanan Sui, Alkis Gotovos, Joel Burdick, Andreas Krause </li>
<li><a href="https://las.inf.ethz.ch/files/krause11contextual.pdf">Contextual Gaussian Process Bandit Optimization</a> - Andreas Krause, Cheng Soon Ong</li>
</ul>
<p>(I am quite fond of Gaussian processes, in case that wasn't already obvious.)</p>
<p>The conclusions were:</p>
<ul>
<li>feedback loops abound in modern ML applications </li>
<li>exploration is central but also delicate, and safety is crucial </li>
<li>statistical confidence bounds allow navigating exploration-exploitation tradeoffs in a principled manner</li>
</ul>
<h3>Poster Session 1</h3>
<p>I was presenting at this session (see my poster <a href="https://github.com/corcra/bf2/blob/master/media/aaai_poster.pdf">here</a>), so I didn't get to look at anything else. I struggled to eat bean tacos one-handed, and I talked a <em>lot</em>.</p>
<h2>Monday</h2>
<h3>Learning Treatment Policies in Mobile Health - Susan Murphy</h3>
<p>I have Susan Murphy's paper <a href="http://dept.stat.lsa.umich.edu/~samurphy/papers/optimal.pdf">Optimal dynamic treatment regimes</a> on my desk <em>as I write this</em>, so I was pretty excited to see her speaking. And on mHealth, too! Double excitement.</p>
<p>It turns out that she is also involved in the <a href="http://www.psc.isr.umich.edu/research/project-detail/36366">Heart Steps</a> project with Ambuj Tewari, which I wrote about a little in my <a href="https://corcra.github.io/ml/2015/12/14/NIPS2015.html">NIPS post</a>, so I'm not going to repeat myself.</p>
<p>The 'treatment optimisation' aspects of mHealth are interesting because it gets into the realm of HCI and psychology. You want to send the patient reminders to do a thing, but you don't want them to become habituated and ignore them, or irritated, or distracted. She mentioned the need to avoid pointlessly reminding the patient to go for a walk while they're <em>already</em> walking, or dangerously alerting them while they're driving. I find it uncomfortable to be reminded that my phone knows when I'm walking/driving, but if the information is being recorded <em>anyway</em>, you might as well use it, right? Insert something about dragnets here.</p>
<p>But really, mHealth provides some very exciting opportunities to do reinforcement learning. She mentioned non-stationarity as a general challenge, and suggested one could perhaps do transfer learning within a user to tackle it.</p>
<h3>Session: Active Learning</h3>
<p><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/17Wray12000.pdf">A POMDP Formulation of Proactive Learning</a> <em>(Kyle Hollins Wray and Shlomo Zilberstein)</em> was interesting. The idea is that the agent must decide which <em>oracle</em> to query to label a particular data point, where the underlying state is the <em>correctness</em> of the current set of labels. I'm not familiar enough with the active learning field to say if this formulation is especially novel, but I liked it, possibly because I like POMDPs.</p>
<h3>Session: Privacy</h3>
<p>I experimented with taking no notes during this session to see how it would influence my recall of the material. The trade-off here is that taking notes is a little distracting for me (as well as providing many opportunities to notice Slack/email/etc.), but does provide a lasting record.</p>
<p><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/10CuencaGrau12253.pdf">Logical Foundations of Privacy-Preserving Publishing of Linked Data</a> <em>(Bernardo Cuenca Grau and Egor V. Kostylev)</em> was strangely fascinating. They were talking about anonymisations of RDF graphs (a data type I'd been working with for my word embedding work). I'm also quite interested in information linkage (see e.g. <a href="https://corcra.github.io/sec/2015/10/27/radical-networks.html">my talk at Radical Networks 2015</a>), so this was up my alley.</p>
<p>Not sure how the experiment worked out, further data required.</p>
<h3>Session: Cognitive Systems</h3>
<p>I was <em>heavily</em> overbooked for this time-slot: I wanted to see Deep Learning 1, Discourse and Question Answering (NLP 6), the RSS talks (for my friend <a href="https://cs.stanford.edu/people/asaxena/papers/sener_saxena_rCRF_rss15.pdf">Ozan's talk</a>), Cognitive Systems (largely for Kazjon's talk - see below), and Machine Learning/Data Mining in Healthcare. Time turners have yet to be invented, unfortunately.</p>
<p>One of the recurring themes of my AAAI v. NIPS pronouncements was that AAAI has, well... more <strong>AI</strong> stuff. This session was probably the closest I got to that (unless you count the AI and Ethics workshop: I'd consider it meta-AI). People were doing reasoning <em>without</em> probability distributions, using first order logic! One of the presentations included <a href="https://www.youtube.com/watch?v=n9TWwG4SFWQ">this video</a> which I found strangely distressing (to me it is - spoilers! - clearly about domestic abuse).</p>
<p>The talk I had come to see, <a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/22Grace12456.pdf">Surprise-Triggered Reformulation of Design Goals</a> <em>(Kazjon Grace and Mary Lou Maher)</em>, along with numerous chats with Kazjon throughout the conference made me realise that computational creativity is a <em>thing</em>. OK, full disclosure: I am loosely involved with some <a href="https://twitter.com/hashtag/botally">generative art folks</a> so I did sort of know this, but it hadn't occurred to me that one might use machine learning to represent or understand mental processes surrounding creativity. Neat! The idea here is that the way humans design things is iterative: you have some loosely-formed idea, and through the process of realising it, notice things you hadn't expected (experience <em>surprise</em>, as it were), and modify your idea accordingly. So there is interplay between the internal representation (perhaps this is the design goal) and the external representation (the realisation). So they're interested in understanding <em>surprises</em>: perhaps an element of a design is <em>unusual</em> given other elements of the design, for example. I am going to have to actually read the paper before I elaborate any further on this, but the experiments involved generating weird (but edible) recipes so I'm looking forward to it.</p>
<p>Very deep question raised by all of this: "can computers be creative?"<br>
Related: what is creativity? What is art? What are computers?</p>
<h3>AI's Impact on Labor Markets - Nick Bostrom, Erik Brynjolfsoon, Oren Etzioni, Moshe Vardi</h3>
<p>I managed to take no notes during this panel (my notes from AAAI actually dry up around here, I hit peak exasperation with keeping my devices charged).</p>
<p>I have a lot of feelings about AI and labour, but I'm first going to direct attention to the Panel on Near-term Issues from the <a href="https://corcra.github.io/ml/2015/12/14/NIPS2015.html">NIPS Algorithms Among Us Symposium</a>, which had a similar lineup. </p>
<p>Ultimately, it is hard to solve social and political issues using technology alone, especially if those issues arise as a result of the technology itself. I'd love to automate away all the mind-numbingly boring and unfulfilling jobs humans currently do, but I don't want to remove anyone's livelihood in the process. I don't think it's sufficient to say that society will 'figure it out somehow', especially in countries such as the USA where there is so little protection from poverty and homelessness. That said, I don't know what the solution is (except for some rather radical ideas with limited empirical support for their efficacy), and I don't know if it will, or should, come from the AI research community.</p>
<h3>Poster Session 2</h3>
<p>I got slightly side-tracked by ranting about how broken academic publishing is. Shoutout to the <a href="https://www.mozillascience.org/contributorship-badges-a-new-project">Mozilla Contributorship Badges project</a> for trying to deal with the credit-assignment problem, for one.</p>
<h2>Tuesday</h2>
<h3>Towards Artificial General Intelligence - Demis Hassabis</h3>
<p>Google DeepMind are arguably the machine learning success story of the last year, given their <a href="www.nature.com/nature/journal/v518/n7540/full/nature14236.html">Atari Nature paper</a> and <a href="http://deepmind.com/alpha-go.html">AlphaGo</a> result (although the match against Lee Sedol in March will be more interesting). I'm very happy to see computer games featuring so prominently for evaluating and developing AGI: so much that I spent the session after this talk sketching out a project involving <a href="https://en.wikipedia.org/wiki/Dota_2">Dota 2</a>, which I think could be a very interesting application of deep reinforcement learning, if only the metagame would stabilise long enough to allow for acquisition of sufficient training data!</p>
<p>Anyway, this talk mostly convinced me that DeepMind are doing cool stuff, which I imagine was the intended effect. Hassabis was coming from a pleasantly principled place. They do seem genuinely interested in AGI, rather than for example, beating benchmarks with <em>yet deeper</em> networks. I don't mean to imply that beating benchmarks isn't important, but I think the types of discoveries one makes in the pursuit of larger/more abstract goals are quite important for the intellectual development of a field which can easily become dominated by engineering successes. So yes, the talk had the intended effect.</p>
<h3>Session: Reinforcement Learning I</h3>
<p><a href="https://twitter.com/__hylandSL/status/699716539147137024"><img src="images/aaai_GIRL.png" class="floatl" style="width: 25vw;"></a></p>
<p><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/19Burchfiel11917.pdf">Distance Minimization for Reward Learning from Scored Trajectories</a> - <em>Benjamin Burchfiel, Carlo Tomasi and Ronald Parr</em>: this is about IRL with suboptimal experts (a popular and interesting topic). In this case, the 'demonstrator' need not be an expert but can operate as a judge, assigning scores to demonstrators. The real-world example would be of a sports coach who's no longer capable of creating expert trajectories (that is, demonstrating optimally) but who can still accurately <em>rate</em> demonstrations from others, if they're available. They also study the case where the judge's scores are noisy and find the algorithm robust.</p>
<p><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/12Pirotta12482.pdf">Inverse Reinforcement Learning through Policy Gradient Minimization</a> - <em>Matteo Pirotta and Marcello Restelli</em>: more IRL through parametrising the expert's reward function, but here it is no longer necessarily to repeatedly compute optimal policies, so this should be quite efficient. Also, this algorithm is called GIRL.</p>
<h3>Poster Session 3</h3>
<p>Some interesting posters (highly non-exhaustive list, but I'm exhausted):</p>
<ul>
<li><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/01Luo11843.pdf">Predicting ICU Mortality Risk by Grouping Temporal Trends from a Multivariate Panel of Physiologic Measurements</a> - <em>Yuan Luo, Yu Xin, Rohit Joshi, Leo Celi and Peter Szolovits</em></li>
<li><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/12Masson11981.pdf">Reinforcement Learning with Parameterized Actions</a> - <em>Warwick Masson, Pravesh Ranchod and George Konidaris</em></li>
<li><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/15Mueller12195.pdf">Siamese Recurrent Architectures for Learning Sentence Similarity</a> - <em>Jonas Mueller and Aditya Thyagarajan</em></li>
</ul>
<h2>Wednesday</h2>
<h3>Sessions: Reinforcement Learning II & III</h3>
<ul>
<li>
<p><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/12Wirth12247.pdf">Model-Free Preference-Based Reinforcement Learning</a> - <em>Christian Wirth, Johannes Fürnkranz and Gerhard Neumann</em>: I didn't actually see this talk, but the paper has a number of interesting words in its title, so it must be good. </p>
</li>
<li>
<p><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/12Bellemare12428.pdf">Increasing the Action Gap: New Operators for Reinforcement Learning</a> - <em>Marc G. Bellemare, Georg Ostrovski, Arthur Guez, Philip S. Thomas and Remi Munos</em>: this was a good talk. Basically, during value iteration one applies the Bellman operator to the state-action value function (Q-function). The fixed point of the operator is the optimal Q-function, which induces (greedily) the optional policy. They argue that this operator is <em>inconsistent</em>, in that it suggests <em>nonstationary</em> policies. They resolve this by definining a 'consistent Bellman operator' which preserves local stationarity and show that it increases the <em>action gap</em> (the value difference between the best and second best actions). The action gap is relevant because it can allow for selecting the same (optimal) action even when estimates of the value function are noisy. And a link to the <a href="http://www.arcadelearningenvironment.org/">Arcade Learning Environment</a>.</p>
</li>
</ul>
<p><a href="https://www.instagram.com/p/BBqx2fHDQM6/?taken-by=c0rcr4"><img src="images/aaai2016_phoenix.jpg" class="floatr" style="width: 25vw;"></a></p>
<ul>
<li><a href="http://www.aaai.org/Conferences/AAAI/2016/Papers/12vanHasselt12389.pdf">Deep Reinforcement Learning with Double Q-Learning</a> - <em>Hado van Hasselt, Arthur Guez and David Silver</em>: more from DeepMind. I swear I am not a DeepMind fangirl. Setup here: Q-learning can result in overestimates for some action values. Using DQN (deep Q-learning algorithm) they find that this happens often and impacts performance. They solve the problem by showing how to generalise Double Q-learning to arbitrary function approximation (rather than just tabular Q functions). So this paper seems like a natural progression for Double Q-learning.</li>
</ul>
<h2>Conclusion</h2>
<p>Exploration-exploitation trade-offs are everywhere. At this stage in my career, I consider going to conferences a largely exploratory activity: I can learn a little (or more) about a lot of things and get an idea for the kinds of research going on. For the people who spend conferences meeting with their collaborators, it's more about exploitation. <em>(For the appropriate interpretation of that word.)</em> I am a little fatigued of exploration right now - I'm still processing things I saw at NIPS, so I was not well positioned to make the most out of AAAI. I kept wanting to run off and write code in a corner, but who does that? Well, I do that. I do that right now.</p>linking between zotero and evernote (in OSX)2015-12-18T00:00:00+00:002015-12-18T00:00:00+00:00corcratag:None,2015-12-18:tips/2015-12-18-zotero-and-evernote.html<p>I'm upgrading my paper-management workflow from 'labyrinth of folders' to an
<a href="https://evernote.com/">Evernote</a> + <a href="https://www.zotero.org/">Zotero</a> mix. I
already use Evernote a little for this by writing paper summaries in
it, but I would rather do the 'heavy duty' management and organisation in
Zotero. So, I'd like to easily switch between the Evernote …</p><p>I'm upgrading my paper-management workflow from 'labyrinth of folders' to an
<a href="https://evernote.com/">Evernote</a> + <a href="https://www.zotero.org/">Zotero</a> mix. I
already use Evernote a little for this by writing paper summaries in
it, but I would rather do the 'heavy duty' management and organisation in
Zotero. So, I'd like to easily switch between the Evernote note about a paper and
the Zotero reference on it. I need:</p>
<ul>
<li>Zotero → Evernote </li>
<li>Evernote → Zotero</li>
</ul>
<p><em>Note: This is all with OSX 10.11.1 (El Capitan), Evernote 6.3, and Zotero 4.0.28.10. YMMV.</em></p>
<h2>Zotero to Evernote</h2>
<p>My solution here is to add an attachment to the reference which is a link to
the Evernote URI. Zotero gracefully handles this, you just right-click on the
reference and Add Attachment → Attach Link to URI...</p>
<p>The hard part is then <em>getting</em> the URI. In (my currently-up-to-date version of)
Evernote, the Copy Note Link gives you a HTTP(S) link:</p>
<div class="highlight"><pre><span></span><span class="c">https://www.evernote.com/shard/asdfgh</span>
</pre></div>
<p><em>This converts to the Evernote URI link if you paste it <strong>inside</strong> Evernote,
which is pretty cool I guess but also not useful here.</em></p>
<p>I use the Evernote client and I don't want this, I want the URI like:</p>
<div class="highlight"><pre><span></span><span class="c">evernote:///view/adfgh</span>
</pre></div>
<p>This is (for now, probably) known as <strong>Classic</strong> Note Link in Evernote, and you
get it by holding down <code>Alt</code> on the menu after right-clicking on the note.
Bizarre and annoying, but whatever. It works.</p>
<p>Now I can just double-click on the Evernote URI attachment on my reference in
Zotero and it'll open the note (in my Evernote client) with my notes on it.</p>
<h2>Evernote to Zotero</h2>
<p>Now, we want to get the Zotero URI (to the reference) and include it in an
Evernote note. The 'normal' URI you'd get from Zotero (using Item URI as your
Default Output Format under Preferences → Export → Quick Copy) is:</p>
<div class="highlight"><pre><span></span><span class="c">http://zotero.org/users/local/asdfgh/items/asdfgh</span>
</pre></div>
<p>What I really want is the non-HTTP URI, e.g.</p>
<div class="highlight"><pre><span></span><span class="c">zotero://select/items/asdfgh</span>
</pre></div>
<p><em>However</em>, if you paste that into Evernote it doesn't recognise it as a URI
or anything that should be linkish. It just sits there, flat and idle and useless. <em>This is pretty annoying given it can
do this for Evernote URIs, as above, but whatever...</em></p>
<h3>Solution Sketch</h3>
<p><em>This solution is from <code>brain.flush()</code>; <a href="http://blog.cdhq.de/archive/1366">
Connecting Zotero and Evernote</a> and <a href="http://blog.cdhq.de/archive/1396">RTF-Links from Zotero in Evernote</a>. This post isn't just a link to that blog because I fear link rot.</em></p>
<p>The workaround is pretty gross but bear with me. First, you modify Zotero
so that its Quick Copy gives you a HTML-formatted URI, e.g.</p>
<div class="highlight"><pre><span></span><span class="nt"><a</span> <span class="na">href=</span><span class="s">"zotero://select/items/asdfgh"</span><span class="nt">></span>Paper Title<span class="nt"></a><br</span> <span class="nt">/></span>
</pre></div>
<p>then convert the HTML in your clipboard to RTF, which can be pasted into Evernote and will act 'as desired'. The intermediate RTF representation looks something like this, btw, so clearly there's scope for further customisation:</p>
<div class="highlight"><pre><span></span>{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf130
{\fonttbl\f0\froman\fcharset0 Times-Roman;}
{\colortbl;\red255\green255\blue255;\red0\green0\blue233;\red0\green0\blue0;}
\deftab720
\pard\pardeftab720\sl280\partightenfactor0
{\field{\*\fldinst{HYPERLINK "zotero://select/items/asdfgh"}}{\fldrslt
\f0\fs24 \cf2 \expnd0\expndtw0\kerning0
\ul \ulc2 \outl0\strokewidth0 \strokec2 Paper Title}}
\f0\fs24 \cf3 \expnd0\expndtw0\kerning0
\outl0\strokewidth0 \strokec3 \
</pre></div>
<p>Ew. But you never need to look at this.</p>
<h3>Specific Steps</h3>
<ul>
<li>Modifying Quick Copy:</li>
<li>Put <a href="https://gist.github.com/ColdDevil/9145021">this script</a> in your <code>translators</code> folder wherever your Zotero is.</li>
<li>Tell Zotero to use it for Quick Copy: Preferences → Export → Default Output Format: select <code>ZotSelect Link (HTML)</code> from the dropdown.</li>
<li>Now <code>Cmd + Shift + C</code> will put the HTML-formatted link in your clipboard.</li>
<li>Converting HTML to RTF:</li>
<li>The script to do the transformation is (choose your favourite <code>UTF-8</code> region...)
<code>export LANG=en_US.UTF-8; pbpaste | textutil -stdin -stdout -format html -convert rtf -inputencoding utf-8 | pbcopy</code></li>
<li>You can automate this with <a href="https://en.wikipedia.org/wiki/Automator_%28software%29">Automator</a>, (OSX tool):<ul>
<li>Create a Service, add an action of <code>Run Shell Script</code>, paste in above code.</li>
<li>Make sure set the "Service receives selected..." dropdown to "no input".</li>
<li>Call the service whatever you want - following the source blog I called mine "Convert HTML clipboard to RTF".</li>
</ul>
</li>
<li>Set a keyboard shortcut for the new service under Keyboard → Shortcuts → Services. Also following the blog, I used <code>Cmd + Shift + Ctrl + C</code>.</li>
</ul>
<p>So now the workflow is:</p>
<ul>
<li>[in Zotero] <code>Cmd + Shift + C</code> on desired reference </li>
<li>[wherever] <code>Cmd + Shift + Ctrl + C</code> to transform contents of clipboard </li>
<li>[in Evernote] paste normally to get a link which opens the reference in Zotero.</li>
</ul>NIPS 2015 by the day2015-12-14T00:00:00+00:002015-12-14T00:00:00+00:00corcratag:None,2015-12-14:ml/2015-12-14-nips2015.html<p>I got back from Montreal yesterday. I was at the <a href="https://nips.cc/">Twenty-ninth Annual Conference on Neural Information Processing Systems (NIPS)</a> - a rather large gathering of people interested in machine learning, neuroscience, artificial intelligence, and related topics. It's an academic conference, and it is intense. Many wonderful conversations were had, things learned …</p><p>I got back from Montreal yesterday. I was at the <a href="https://nips.cc/">Twenty-ninth Annual Conference on Neural Information Processing Systems (NIPS)</a> - a rather large gathering of people interested in machine learning, neuroscience, artificial intelligence, and related topics. It's an academic conference, and it is intense. Many wonderful conversations were had, things learned, insights gained, ideas developed, coffees consumed. Old friends met and new friends made. I left physically exhausted, and this post is an attempt to summarise <em>some</em> of what went down. This was also my first time attending NIPS, so next time I might be a <em>little</em> more conservative with my energy.</p>
<p>If it seems like my level of detail varies wildly, it's because sometimes I took
notes, sometimes I couldn't, and sometimes I didn't want to.</p>
<h2>Sunday</h2>
<p><img src="images/nips2015_01.png" class="floatr"></p>
<p>When I flew from Dublin to Hamburg for <a href="https://events.ccc.de/category/31c3/">31C3</a>
last year, the plane was full of vaguely unusual-looking people (myself
included, no doubt) clearly destined for Congress. Who else would fly to Hamburg
on St. Stephen's day? The flight from NYC to Montreal for NIPS was a little less
homogeneous, and machine learners are harder to spot (posters are strong
evidence), but I nonetheless had the same vague feeling of unified purpose with
my co-passengers. Conversation about optimisation broke out on the bus to the
city centre, and knowing glances were exchanged between strangers. And so NIPS
began as it would continue, a bubble where the social convention of silence is
broken by mutual knowledge of shared purpose (this purpose being bringing about the robot apocalypse).</p>
<p>Tip: don't try to register the day the conference starts. Angry Monday
morning tweets mentioned waiting times some multiples of how long I spent on
Sunday evening. ¯\_(ツ)_/¯</p>
<h2>Monday</h2>
<p>Because I forgot to register for the <a href="http://wimlworkshop.org/">Women in Machine Learning workshop</a>,
I went to tutorials.</p>
<h3>Deep Learning: Yoshua Bengio & Yann LeCun</h3>
<p>Topics mentioned were: curse-of-dimensionality, backpropagation, convolutional nets,
recurrent nets, details about backprop (e.g. with ReLUs and max pooling,
GPUs), distributed training (e.g. asynchronous stochastic gradient descent),
applications (eg. vision, more about vision, speech, natural language),
attention mechanisms, encoder/decoder networks (e.g. for machine translation),
multi-task learning, unsupervised learning, undirected graphical models,
more about auto-encoders (e.g. probabilistic interpretation, helmholtz
machines), semi-supervised learning (e.g. ladder networks), and some challenges
and open problems. The future questions/areas of interest highlighted were:</p>
<ul>
<li>unsupervised learning, and how to evaluate it? </li>
<li>how to include long-term dependencies? </li>
<li>NLP, generally </li>
<li>optimisation </li>
<li>distributed training? </li>
<li>bridging the gap to biology </li>
<li>deep reinforcement learning</li>
</ul>
<p>Overall, I wanted to see more gorey details, but <em>deeper</em> coverage of any one
topic would have limited breadth, so it was more like a lit review/series of
pointers to publications in this field. There was criticism that it placed too
much attention on the work of its presenters (also Hinton, who was meant to be
there but couldn't make it unfortunately), and gave an incomplete treatment of
the history of the field. I'm not in a position to comment intelligently on
that. Anyone giving an overview-style talk has a responsibility to adequately
cover both history and breadth of research, so I can see why it might have been
made.</p>
<h3>Probabilistic Programming: Frank Wood</h3>
<p>I had already heard some of this content at MLSS 2015 Tübingen so didn't take
notes. Check out <a href="https://bitbucket.org/probprog/mlss2015">this repo</a> for the
material from the practicals on Anglican. TL;DR:</p>
<blockquote><p lang="en" dir="ltr">Goals of probabilistic programming: reduce coding burden, commodify inference, create weird new models, make it widely usable <a href="https://twitter.com/hashtag/NIPS2015?src=hash">#NIPS2015</a></p>— Stephanie Hyland (@__hylandSL) <a href="https://twitter.com/__hylandSL/status/673929524958990336">December 7, 2015</a></p></blockquote>
<h3>Introduction to Reinforcement Learning with Function Approximation: Rich Sutton</h3>
<p><img src="images/nips2015_02.png" class="floatl" style="width: 35vw;"></p>
<p>I took <em>physical notes</em> for this tutorial, because there was a severe lack
of power outlets in the convention centre. Tip: sometimes it's better
to have a notebook with a long battery life than a retina screen.</p>
<p>I think reinforcement learning is really cool (and according to how popular
the deep RL workshop was, so do other people (or maybe they just like 'deep')).</p>
<p>This tutorial was much more focused than deep learning: it was concerned with
policy-learning through first getting an action-value function. This function
gives you the expected reward (usually with discounting) upon taking a
particular action from a particular state, and can therefore be used to define a
policy (e.g., greedily, given your state choose the action with highest value). </p>
<p>He spoke about on- and off-policy learning, where the agent is obtaining
information for its estimate of the action-value function while either following
the policy given by such a function (on-policy) or some other policy (off-policy),
such as a random policy. I hadn't properly appreciated the significance of this
difference before, so I found the exposition illuminating. He gave an example
where on-policy learning resulted in the highest average reward across
episodes, but its learned policy was worse than that of an off-policy learner, since
the off-policy learner was able to explore 'riskier' actions. My intuition here
is that this result could be altered by tweaking rewards and the inclination
towards exploration in the 'off' policy, and I'm sure there is loads of
(ancient) work already done on the topic. More papers to read, eh.</p>
<p>Another neat thing about off-policy learning is that you can gather information
about many potential policies simultaneously. This might seem 'trivially obvious'
(exploration leads to information about the system and its rewards which enables
policy-learning) but it is always reassuring to hear one's intuitions restated
by an expert in the field.</p>
<p>Overall this was the most lecture-like of the tutorials and hopefully it will
appear online soon, because it was well-paced, well-motivated and overall the
most useful, even if it wasn't all-encompassing for reinforcement learning (it
wasn't trying to be). Sutton is a good educator.</p>
<h3>Poster Session 1</h3>
<p><em>I did this session 'wrong'. I tried navigating through an impassable crowd of
humans and coats and bags to peer at each poster and then decide if I wanted to
hear more. Tip: do not do this. For everyone's sake.</em></p>
<p><a href="http://papers.nips.cc/paper/5717-taming-the-wild-a-unified-analysis-of-hogwild-style-algorithms">Taming the Wild: A Unified Analysis of Hogwild-Style Algorithms</a>- <em>Christopher M. De Sa, Ce Zhang, Kunle Olukotun, Christopher Ré</em> - I need more asynchronous
SGD in my life. They look at the noise you get from asynchronous updates,
derive some results and describe a lower-precision SGD algorithm. I am disproportionately likely to pay attention to posters/papers with cool titles.</p>
<p><a href="https://www.princeton.edu/~ms44/nips2015/">A Theory of Decision Making Under Dynamic Context</a> - <em>Michael Shvartsman, Vaibhav Srivastava, Jonathan D. Cohen</em> - Neuroscience! Decision making! I have apparently forgotten the main message of this poster, possibly because we rapidly started talking about psycholinguistics. The danger of NIPS is exhaustion through too many interesting conversations. Added bonus for this poster: he made it + code + paper available (see link).</p>
<p><a href="http://papers.nips.cc/paper/5635-grammar-as-a-foreign-language">Grammar as a Foreign Language</a> - <em>Oriol Vinyals, Łukasz Kaiser, Terry Koo, Slav Petrov, Ilya Sutskever, Geoffrey Hinton</em> - by the time I made it to this poster the session was over so I didn't get to speak to any of the authors. Main idea: parsing with LSTM + attention! The 'foreign language' part comes in because it's sequence-to-sequence (sentence to linearised parse tree), which is typically found in machine translation settings.</p>
<h2>Tuesday</h2>
<p>I was unreasonably tired and questioned the wisdom of staying at a poster session until after midnight. <a href="http://mlg.eng.cam.ac.uk/zoubin/">Zoubin Ghahramani</a> spoke about <strong>Probabilistic Machine Learning</strong> while I ate pastries with a fork in the overflow room. The overflow room would have been perfect if it had any power outlets in it. I've heard some variant of Zoubin's talk roughly twice already, thanks to <a href="http://mlss.tuebingen.mpg.de/">MLSS 2015</a> and <a href="http://gpss.cc/">GPSS 2014</a>, so I lost focus and probably missed something new and important. He mentioned probabilistic programming and the <a href="http://www.automaticstatistician.com/index/">automatic statistician</a>. One of the questions was about whether this (the automatic statistician) will replace machine learners : a terrible thought, and ironic for a discipline which (to some extent) aims to automate away many other jobs. The answer was (as you might expect, may have even given yourself); 'this will just make our jobs easier, allowing us to focus on more interesting problems'.</p>
<p>The talk after Zoubin was rather technical and about singular value decomposition. I missed some critical thread of understanding at the start (see missing focus) and sort of give up following, although I note that the speaker was just <em>quite good</em>, even if the topic is not directly relevant to me.</p>
<p>Spotlights as a concept are interesting, and their intended purpose is a little unclear to me. If the poster is personally relevant and interesting, I will (possibly) already know about it and go to it. If it's not relevant, a three-minute summary is <em>unlikely</em> to change my mind. The intended benefits I could imagine (for the presenters) are:</p>
<ul>
<li>convincing other members of your field that your poster is interesting/worthwhile</li>
<li>convincing people from outside your area that your poster is relevant </li>
</ul>
<p>However, each of these necessitates a very different three-minute presentation (detailed versus high-level), and it's hard to say what the presenters went with. Further possible benefit:</p>
<ul>
<li>be able to state that one's poster was selected for highlight </li>
</ul>
<p>In which case, the audience need not pay any attention. This is another way of saying that while I did listen, most of the spotlighted posters didn't make it into my cut for later. However, the final benefit (for the audience) was appreciated:</p>
<ul>
<li>exposure to entirely different sub-field and its different priorities and problems </li>
</ul>
<p>I spent much of the afternoon charging my laptop in a corner of the convention centre and doing some work, so there are some <em>deleted scenes</em> from the conference here. I got an especially foul latte and suffered it for too long. What sort of monster uses artificial sweetener without asking first?</p>
<h3>Poster Session 2:</h3>
<p><em>New poster session policy: consult conference book, select posters, target.</em></p>
<p><a href="http://arxiv.org/abs/1506.05751">Deep Generative Image Models using a Laplacian Pyramid of Adversarial Networks</a> - <em>Emily Denton, Soumith Chintala, Arthur Szlam, Rob Fergus</em> -
Emily Denton was part of the way into an explanation of adversarial networks when I arrived at this poster. I feel like I've heard a lot about them in recent days, but it's probably just the <a href="https://en.wikipedia.org/wiki/List_of_cognitive_biases#Frequency_illusion">Baader-Meinhof phenomenon</a>. I like the idea, although I feel like there's probably a way to show that the procedure is equivalent to some other contrastive objective or falls out naturally from an appropriate model choice, but these idle thoughts are better substantiated later/elsewhere/in prior art.</p>
<p><a href="http://papers.nips.cc/paper/5776-expressing-an-image-stream-with-a-sequence-of-natural-sentences">Expressing an Image Stream with a Sequence of Natural Sentences</a> - <em>Cesc C. Park, Gunhee Kim</em> - fairly complicated deep network architecture, the idea is to create a reasonable-looking set of sentences to describe a sequence of images. Training data is blog posts containing pictures, assumed related (they break it into image/text-block segments). Some possibly-interesting pre-processing on the text data (I am biased to find text more interesting than images!), too.</p>
<p><a href="http://www.eecs.berkeley.edu/~igor.mordatch/policy/index.html">Interactive Control of Diverse Complex Characters with Neural Networks</a> -<em>Igor Mordatch, Kendall Lowrey, Galen Andrew, Zoran Popović, Emanuel Todorov</em> - using a recurrent neural network to learn the dynamics under a control policy; seemingly mapping from the state to the velocities (dynamics) caused by an action.</p>
<p><a href="http://papers.nips.cc/paper/5792-efficient-learning-of-continuous-time-hidden-markov-models-for-disease-progression">Efficient Learning of Continuous-Time Hidden Markov Models for Disease Progression</a> - <em>Yu-Ying Liu, Shuang Li, Fuxin Li, Le Song, James M. Rehg</em> - a medically-focused paper! The advance seems to be making continuous-time HMMs more feasible. How much? I'm not sure, I didn't stay too long.</p>
<p><a href="http://papers.nips.cc/paper/5751-asynchronous-parallel-stochastic-gradient-for-nonconvex-optimization">Asynchronous Parallel Stochastic Gradient for Nonconvex Optimization</a> - <em>Xiangru Lian, Yijun Huang, Yuncheng Li, Ji Liu</em> - this is a theory paper about asynchronous SGD. I was initially confused because I didn't know the state of the theory here, and wasn't sure what their actual contribution was. The contribution is about the convergence rate. The take-home for me is roughly 'you can use asynchronous SGD'. See also the poster from Monday on Hogwild!.</p>
<h2>Wednesday</h2>
<p>I missed Tibhshirani's talk, <em>Post-selection Inference for Forward Stepwise Rregression, Lasso and other Adaptive Statistical Procedures</em>. This was unfortunate given the topic of lunchtime discussion was adaptive statistical procedures (among other things). Being interdisciplinary is interesting: I can simultaneously observe biology's obsession with p-values and machine learning's apparent lack of interest (to generalise <em>wildly</em>). I am not sure how many papers demonstrate <em>statistically significant</em> improvement over state-of-the-art, and while I should back up this speculation with reality, at the present moment (1:19am on Thursday) I'll say 'not many' and leave a generic pointer to Gelman's paper <a href="http://www.stat.columbia.edu/~gelman/research/unpublished/p_hacking.pdf">The garden of forking paths: Why multiple comparisons can be a problem, even when there is no “fishing expedition” or “p-hacking” and the research
hypothesis was posited ahead of time</a>.</p>
<p>Some of the talks/spotlights ended up being poster picks of mine, so I'll describe them below.</p>
<p>I was strangely entranced by <a href="http://arxiv.org/abs/1412.7091">Efficient Exact Gradient Update for training Deep Networks with Very Large Sparse Targets</a>. I have a soft spot for linear algebra tricks. The idea is basically that when you have a very large, but sparse target - as you might get in a language modelling task (trying to predict which of O(100,000) words comes next) - you can do <em>smart things</em> to obtain gradients without actually calculating the horrible non-sparse, high-dimensional output. Lovely. The problem is that this only works for <em>certain classes</em> of loss functions, <em>not</em> including the traditional log softmax one sees in these language applications. So possibly limited benefit, but worthy of further investigation.</p>
<h3>Poster Session 3</h3>
<p><em>Refining the poster-session policy, I made it to too many posters and fried my brain.</em></p>
<p><a href="http://papers.nips.cc/paper/5845-deep-visual-analogy-making">Deep Visual Analogy Making</a> - <em>Scott E. Reed, Yi Zhang, Yuting Zhang, Honglak Lee</em> - this was a full oral presentation so the poster was crowded. Oh, to be tall. Analogy idea: A 'is to' B as C 'is to' D, given (or simultaneously with) representations of A, ..., D, what does 'is to' mean? Oft-cited example from language modelling is the 'king is to queen as man is to woman' example (from <a href="http://arxiv.org/abs/1310.4546">word2vec</a>) where 'is to' is apparently a constant offset vector in the representation space (which is a vector space). This is a very general problem and one I could rant about for quite a long time (indeed, I have <a href="http://arxiv.org/abs/1510.00259">a paper</a> on a related topic) so I'll say that the new thing here seems to be the application to images, and nice results/experiments... and probably other details that will only emerge when I read the paper. Cool bonus: they used free (as in Free) game art from the <a href="http://lpc.opengameart.org/">Liberated Pixel Cup</a>.</p>
<p><a href="http://papers.nips.cc/paper/5850-training-very-deep-networks">Training Very Deep Networks</a> - <em>Rupesh K. Srivastava, Klaus Greff, Juergen Schmidhuber</em> - (disclosure: Rupesh and Klaus are friends of mine)
Deeper networks are more better, but training them is hard (vanishing gradients and whatnot) - what to do? Highway networks tackle this by putting gates on layers, choosing between 'transporting' and 'transforming' data. Transporting is just an identity operation and therefore doesn't complicate gradients at all. There are (probably very obvious, for those who know LSTMs) connections to LSTMs here also. Keeping in line wih Klaus's Kubrik-inspired paper titles (previous ones being <a href="http://arxiv.org/abs/1402.3511">A Clockwork RNN</a>) and <a href="http://arxiv.org/abs/1503.04069">LSTM: A Search Space Odyssey</a>) I'd suggest 'Highway Networks or: How I Learned to Stop Worrying and Transport the Data', but admit further work is needed in this direction.</p>
<p><a href="http://papers.nips.cc/paper/5846-end-to-end-memory-networks">End-to-end Memory Networks</a> - <em>Sainbayar Sukhbaatar, arthur szlam, Jason Weston, Rob Fergus</em> - continuous extension of <a href="http://arxiv.org/abs/1410.3916">memory networks</a>, thus can be trained end-to-end (that is, without direct supervision at each layer, just from input-output pairs). The basic idea of a memory network is that you have some <em>memory component</em> (surprisingly enough) which the model <em>learns</em> to read and write to. Obvious applications is question-answering: feed it some text describing a scene, situation etc., then ask questions. I wondered how difficult these tasks could become before the methods started to break down and suggested (I think it was to szlam) that the GRE logic puzzles might be interesting for that, but alas, restricted-access data. One of many reasons we cannot have nice things.</p>
<p><a href="http://papers.nips.cc/paper/5860-on-the-job-learning-with-bayesian-decision-theory">On-the-job Learning with Bayesian Decision Theory</a> - <em>Keenon Werling, Arun Tejasvi Chaganty, Percy S. Liang, Christopher D. Manning</em> - humans are quite good at tasks you might want an algorithm to perform, but employing humans is expensive (in many ways). Algorithms scale much better in this regard, but they have unacceptably bad performance until they've seen enough data. Solution: combine both. Get the algorithm to assess its certainty on the task, and ask for help when it needs it (using Amazon Mechanical Turk). Seems quite cool/useful, although I have some Complicated Feelings about turking (is it fine? is it creepy? is it exploitative somehow?).</p>
<p><a href="http://papers.nips.cc/paper/5873-a-framework-for-individualizing-predictions-of-disease-trajectories-by-exploiting-multi-resolution-structure">A Framework for Individualising Predictions of Disease Trajectories by Exploiting Multi-Resolution Structure</a> - <em>Peter Schulam, Suchi Saria</em> - carefully constructed hierarchical model of disease trajectory to identify patient subgroups. In particular, using a noise model (gaussian process with particular kernel choice) which allows for transient trends such as infection, medication etc. I think the disease severity is measured by lung capacity, so it's a 1-dimensional state space (although patients have covariates etc.), but I don't see any reason why a similar model couldn't handle other state-spaces. It makes for nice graphs, anyway. I'm glad to see probabilistic graphical models for healthcare represented at NIPS.</p>
<h2>Thursday</h2>
<p>Some last minute poster-printing shenanigans occupied the morning. For future reference: <a href="http://www.copienova.com/">Copie Nova</a> printed my A1 poster in 15 minutes.</p>
<h3>Poster Session 4</h3>
<p><em>Update to policy: bump into a friend, end up chatting about twitter bots and other side projects. Miss half the poster session.</em></p>
<p><a href="http://papers.nips.cc/paper/5949-semi-supervised-sequence-learning">Semi-supervised Sequence Learning</a> - <em>Andrew M. Dai, Quoc V. Le</em> - I marked this and have no memory of actually reading the poster. I suspect it was mobbed and I gave up. Things in the direction of unsupervised learning are interesting, so the paper is probably interesting.</p>
<p><a href="http://papers.nips.cc/paper/5950-skip-thought-vectors">Skip-Thought Vectors</a> - <em>Ryan Kiros, Yukun Zhu, Ruslan R. Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, Sanja Fidler</em> - this is the only paper I had already read before coming to the conference, so it was neat to get to talk to Kiros about it briefly! The idea is basically: as in word2vec, you learn a representation of 'meaning' by trying to predict context. This time, the prediction is of the preceding and subsequent <em>sentences</em>, using RNN encoders/decoders. They also use an interesting trick to augment their underlying word representations by learning a mapping from pre-trained word2vec vectors into their mapping space. This allows for any word2vec-learned word to be used in their setup. I was surprised that this worked well, since the problem should be over-determined (they solve this approximately with a L2 loss, but still). The title is also very eye-catching (the term was coined by Hinton, according to Kiros), although I think we're still a ways away from actually representing <em>thoughts</em>. Sentences are closer than words, but are they close enough?</p>
<h3>Symposium: Algorithms Among Us: the Societal Impacts of Machine Learning</h3>
<p>I am so excited to see the field talking about this. It is very easy as a scientist to divorce oneself from the social, ethical, economic etc. consequences of one's work. I was glad to see a large crowd turn out to this, although there's certainly an element of 'self preservation' here - that is, how do we make sure machine learning (and artificial intelligence) retains a positive status in the eyes of everyone else, and some element of sensationalism regarding 'scary killer robots of the future' (aka 'the children of the singularity are going to murder us all and something about Roko's basilisk'). Nonetheless, cool discussions were had.</p>
<h4>Economic Issues</h4>
<p><a href="http://ebusiness.mit.edu/erik/">Erik Brynjolfsson</a> spoke about the <strong>Economic Implications of Machine Intelligence</strong>. He was proposing that we are in a 'second machine age'; where previously machines were used to replace physical power (as in the industrial revolution), we now see computers providing <em>mental power</em>, which possibly threatens not to complement humans but replace us. This has implications for the economy (what doesn't?). He showed some graphs about income trends in the USA, which were (as usual) horrifying and enraging. It's uncertain how we can use machine learning to combat this without simultaneously bringing about other changes in society/the economy.</p>
<h4>Legal Issues</h4>
<p><a href="www.iankerr.ca">Ian Kerr</a> spoke about <strong>Machine Learning and the Law</strong>, which was fascinating. Question: can computers <em>make contracts</em>? Apparently yes! What about <em>product liability</em>? The manufacturer is usually responsible if there's a <em>defect</em> in a product, but what if your autonomous vehicle drives into a wall to save a small child? It's doing what it was programmed to do - who's to blame? On that point, <em>should</em> it do that? He mentions <em>volenti non fit injuria</em>, that people who enter into risky activities should assume the risk (and entering a self-driving car is a risky activity, arguably). More questions: how much <em>faith</em> should we put in the output of an algorithm? What if an automated medical diagnosis disagrees with a human? Who do we trust? There are questions of both <em>moral</em> and <em>legal</em> liability. If your instinct is to respond with 'trust the human, of course' - what if the algorithm's track record is provably much better than that of the human?</p>
<h4>Panel on Near-Term Issues</h4>
<p>(with <em>Tom Dietterich, Ian Kerr, Erik Brynjolfsson, Finale Doshi-Velez, Neil Lawrence, Cynthia Dwork</em>.) </p>
<p>I didn't write down who said what, so to anonymously summarise some of the points raised:</p>
<ul>
<li>the philosophical problems (e.g. trolley/tunnel problem) aren't so clear-cut, because there is <em>uncertainty</em> and also split-second decision-making which may render 'consulting the human driver' an untenable option. </li>
<li>re: people losing jobs to automation: this has been happening for a long time, but that doesn't necessarily make it acceptable. However, arbitrarily banning/regulating things is also not desirable. Both under and over regulation are possibly dangerous. </li>
<li>we should look for ways that AI can <em>enhance</em> human capabilities, rather than trying to <em>replicate</em> it - this might result in very different-looking research and outcomes. </li>
<li>sometimes there just <em>isn't a right answer</em> because we don't know what the objective function is (particularly in ethics), and encoding a single system of values maybe a fool's errand. (I'm reasonably confident Neil Lawrence said this.) </li>
<li>counter-point to the above: robust loss functions exist to allow us to optimise a possibly-misspecified objective function. </li>
<li>we are actually already quite forgiving of (human) mistakes in medicine! </li>
<li>skill/income gap: what about <em>developing countries</em>? Someone pointed out that China has moved to a higher-income country, but mostly by doing the low-skilled labour no longer performed in The West.</li>
</ul>
<h4>Panel: Human-level AI... If, How, and When?</h4>
<p>(with <em>Yann LeCun, Andrew Ng, Gary Marcus, Shane Legg, Tom Dietterich</em>) </p>
<p>More semi-anonymous points:</p>
<ul>
<li><em>obviously</em> artificial general intelligence (AGI) is a crude concept, but it's still useful... "I'll know it when I see it." </li>
<li><em>generality</em> is the main difference between task-oriented algorithms and AGI, but maybe human-level AGI is not so important. </li>
<li>reasons to pursuse AGI include better understanding human intelligence, and other questions of psychology. </li>
<li>someone questions how useful AGI is to society, as individualised systems already work very well. </li>
<li>counter-point to above: hand-crafted systems are being outperformed in some tasks by 'less engineered' ones. </li>
</ul>
<p><img src="images/nips2015_03.png" class="floatr"></p>
<ul>
<li>quote from Andrew Ng: "working on AGI today is like working on colonising Alpha Centauri", although he isn't opposed to other people working on it. </li>
<li>LeCun emphasises the importance of unsupervised learning for approaching more intelligent machines. </li>
<li>Ng says that seeing into the future is hard if not impossible, and reiterates the importance of unsupervised learning for progress. </li>
<li>re: self-driving cars: Ng suggests starting with vehicles autonomous on <em>specific routes</em>, and then expanding their range of activity, rather than starting with an everywhere-driving car which increases in autonomy. </li>
<li>"AGI will not be an event. It won't happen instantaneously. We will add capabilities. The hardware matters. Much of our meta-reasoning is about resource allocation. Different hardware infrastructures will lead to different trade-offs. We will see systems with different strengths and weaknesses to humans." </li>
<li>minor counter-point to above: maybe in the future, the point at which computers can read open-ended general-domain texts will be regarded as 'the turning point'</li>
<li>Ng: (paraphrasing): "Forming a committee about evil AI robots is like worrying about overpopulation on Mars."</li>
<li>LeCun: (approximately, my live-transcription has a non-zero error-rate): "We like to think of our mind as being a generally intelligent machine, but our brains are very very far from being general. We’re driven by basic instincts built into us by evolution for survival, our brains are very limited in their types of connections and functions/signals they can process/compute efficiently. We’re very slow at adding numbers together… it’s very difficult for us to imagine a different type of intelligence than human intelligence, because that’s the only example we have in front of us. Machines will look very different. They won’t have the drives which cause humans to do bad things to each other."</li>
</ul>
<h2>Friday (<a href="https://sites.google.com/site/nipsmlhc15/">Workshop on Machine Learning in Healthcare</a>)</h2>
<p>This is technically <em>how</em> I was at NIPS, I was presenting a poster (and I got travel funding).</p>
<p><img src="images/mlhc_poster_final.png" class="floatl"></p>
<p>To my eternal shame and regret, I missed everything before the first poster session. I hope the talks will be online soon, because they sounded great:</p>
<ul>
<li>Integrating Artificial Intelligence into Emergency Care - <em>Steven Horng</em> </li>
<li>Data-driven Phenotyping of Autism Spectrum Disorders - <em>Finale Doshi Velez</em> </li>
<li>Behavioral Analytics in Mental Health Care - <em>Gourab De</em></li>
</ul>
<p>I also accidentaly double-presented my poster, so didn't have time to thoroughly examine work from others.</p>
<p>Rich Caruana spoke about <strong>Accuracy on the test set is not enough --- the risk of deploying unintelligible models in healthcare</strong>: interpretability is important in healthcare! He gave an example of a rule-based model which, upon inspection, revealed that asthma appeared to predict <em>better</em> outcomes for pneumonia patients. Further reflection yielded the explanation that such patients are more closely monitored and may go to the hospital earlier/more often.</p>
<p>This reminds me of a lesson from my biostatistics class during Part III: from an entirely unspecified population, the information that a given individual has a diagnosis of breast cancer <em>improves</em> their life expectancy relative to the population at large. Why? Such a diagnosis means:</p>
<ul>
<li>patient is likely female </li>
<li>patient is from a country with breast cancer screening programs </li>
</ul>
<p>... both of which improve one's life expectancy relative to global average. Couple this with reasonable-ish outcomes for breast cancer diagnoses and you have the seemingly counter-intuitive result. The lesson is to always be vigilant (for confounders).</p>
<p><a href="http://shahlab.stanford.edu/">Nigam Shah</a> spoke about <strong>Building [Machine] Learning Healthcare Systems</strong>. Apparently 91% of the increase in healthcare costs in the USA is attributable to price increases, and not specific services or ageing. Citation required, obviously, but I didn't take it down. He spent some time discussing how existing data sources (EHRs, clinical trials, chemical databases, health forums, physician query logs, PubMed) can be used to do three things (this is probably an overview of the work done in his lab):</p>
<ol>
<li>answer clinical questions, e.g. <em>does androgen therapy for prostate cancer influence risk of Alzheimer's, also as a function of age?</em> </li>
<li>obtain insights from data, e.g. <em>here's a pile of data, tell me something I don't know</em> </li>
<li>form predictive models, e.g.</li>
<li>which patients will become expensive next year?</li>
<li>which patients have wounds that won't heal?</li>
<li>which patients may have latent diseases?</li>
</ol>
<p>There were several <strong>contributed talks</strong>. My favourite was from <a href="http://jeannesauve.org/scholar/charles-onu/">Charles C. Onu</a> about <strong>detecting asphyxia from a baby's cry</strong>. Problem setting: asphyxia in newborns is potentially fatal or debilitating, but typical clinical diagnosis requires resources which are not always available (e.g. in rural locations in Nigeria). It turns out that babies with asphyxia <em>cry in a detectably different way</em>. So he developed the tools (signal processing, classification) and <a href="http://www.ubenwa.com/">an app</a> to do this on smartphones (high penetration even in low-resource settings). This is one of the coolest applications of machine learning I've heard of, and it didn't require deep learning. He won the prize for best contribution, and deservedly so. This should be a reminder that impact comes from <em>solving important problems</em>, not (necessarily) using high-tech solutions.</p>
<p><a href="http://dept.stat.lsa.umich.edu/~tewaria/">Ambuj Tewari</a> spoke about <strong>Personalised mHealth</strong>. I find this stuff really fascinating (and wish I had any spare time to work on it - all my spare time is occupied by lasers right now). He motivated the issue by pointing out the <em>dire</em> state of mental health care in India: apparently there are 343 clinical psychologists (in the <em>country</em>?), out of a required 13,259, and 290 psycho-social workers out of 19,064. Clearly, anything technology can do to bridge this gap is huge. He pointed out that since smartphone penetration is very high, mHealth has a lot of potential. Then my laptop battery died.</p>
<p>The rough idea is to use reinforcement learning and expertise from human-computer interaction to devise apps which encourage <em>behaviour modification</em> in their users. This idea is a little terrifying when you think of malicious actors (encouraging addiction to pay-per-use services/games for example), but their intentions here were noble (so the tech will never be misused, right?). The stated application was fitness for people at risk of heart disease, if I recall. Finding the right balance of push/pull notifications (including frequency and number) is important to encourage persistent engagement. I'm particularly excited for mHealth applications to mental health, especially for self-monitoring and anomaly-detection. These things already exist to an extent, but I'm not sure how much they rely on machine learning.</p>
<h2>Saturday (<a href="http://www.thespermwhale.com/jaseweston/ram/">Reasoning, Attention and Memory Workshop</a>)</h2>
<p>This workshop was very crowded, and I was only able to get a seat for the first session, so my notes are terrible/missing. The slides are on the workshop page, anyway, so I'm going to substitute an actual overview of this workshop with the following set of bad jokes:</p>
<p><a href="https://twitter.com/__hylandSL/status/675669409344671744"><img src="images/nips2015_pun1.png" class="center"></a>
<a href="https://twitter.com/__hylandSL/status/675698712761511936"><img src="images/nips2015_pun2.png" class="center"></a>
<a href="https://twitter.com/__hylandSL/status/675699512430764032"><img src="images/nips2015_pun3.png" class="center"></a>
<a href="https://twitter.com/__hylandSL/status/675761837279965185"><img src="images/nips2015_pun4.png" class="center"></a>
<a href="https://twitter.com/__hylandSL/status/675817625876852736"><img src="images/nips2015_pun5.png" class="center"></a></p>
<p>No regrets.</p>
<p><em>Workshop bonus: free icecream.</em></p>
<h2>Conclusion</h2>
<p>There are a lot of smart people working on a lot of interesting problems. Industry interest in machine learning is very high, and it is possible to do research outside of academia. (This is a curiosity for a former theoretical physicist.) The deep learning wave is <em>possibly</em> cresting, although <em>deep reinforcement learning</em> seems to be pretty hot. Models including memory are exciting and potentially very powerful, for performance on standard tasks and for (the non-orthogonal problem of) modelling <em>reasoning</em>. Unsupervised learning is the future. Healthcare is clearly a wonderful match for <em>interpretable models</em>, both as an application and a source of inspiration for theoretical development (<em>cf.</em> <a href="https://en.wikipedia.org/wiki/Cauchy%E2%80%93Riemann_equations#Physical_interpretation">complex analysis and physics</a>). The community is vibrant (if hilariously gender-imbalanced), and I'm looking forward to next year.</p>vortidplenigilo2015-11-21T00:00:00+00:002015-11-21T00:00:00+00:00corcratag:None,2015-11-21:lang/2015-11-21-vortidplenigilo.html<p>I have been learning Esperanto lately (see <a href="lang/2015-10-31-esperanto-done-quick.html">here</a>).
One of the really cool features of the language is <a href="http://en.lernu.net/lernado/gramatiko/konciza/afiksoj.php">affixes</a>.
Basically, you can create new words using some simple morphological rules, e.g.:</p>
<blockquote>
<p>bona (good) → bonulo (good person)<br>
juna (young) → junulo (young person)</p>
<p>vorto (word) → vortaro (group of words = dictionary/vocabulary …</p></blockquote><p>I have been learning Esperanto lately (see <a href="lang/2015-10-31-esperanto-done-quick.html">here</a>).
One of the really cool features of the language is <a href="http://en.lernu.net/lernado/gramatiko/konciza/afiksoj.php">affixes</a>.
Basically, you can create new words using some simple morphological rules, e.g.:</p>
<blockquote>
<p>bona (good) → bonulo (good person)<br>
juna (young) → junulo (young person)</p>
<p>vorto (word) → vortaro (group of words = dictionary/vocabulary)<br>
arbo (tree) → arbaro (group of trees = forest)</p>
</blockquote>
<p>There are a lot of affixes <em>(at time of writing I have 48 suffixes and 18
prefixes)</em>, so I thought it might be useful to write a small program to create
new words by randomly attaching these affixes, then quizzing myself on them.</p>
<h3><a href="https://github.com/corcra/esperanto">Here it is.</a> (see <a href="https://github.com/corcra/esperanto/blob/master/soup.py"><code>soup.py</code></a>)</h3>
<p>Usage is like this, for example:</p>
<div class="highlight"><pre><span></span>> soup(root=u'hundo', n_p=1, n_s=4, cheat=True)
hundo + pseŭdo : false
+ uj : container for objects described by root
+ esk : similar to/in the manner of whatever is described by root
+ eg : augments or strengthens idea shown by root affix(opposite of -et)
+ ec : quality/characteristic defined by root
pseŭdohundujeskegeco
</pre></div>
<p><code>n_p</code> is the number of prefixes, <code>n_s</code> suffixes.
The <code>cheat</code> flag toggles printing the explanation.</p>
<p>So let's interpret <code>pseŭdohundujeskegeco</code>... this is an abstract noun, the
quality/characteristic of being a large thing similar to a container for false
dogs. Or a false quality of being a large thing similar to a container for dogs.
The order of interpretation is clear for suffixes <em>or</em> prefixes, I'm not sure
how to resolve it when both are present.</p>
<p>This is obviously a ridiculous word which no normal person would use, but I
find generating and interpreting these very entertaining. Another example...</p>
<p><a href="https://twitter.com/corcra/status/666986280199262209">
<img src="images/ballet_eo.png" class="center"></a></p>
<blockquote>
<p><code>baledejarinegestro</code>: boss of an enormous, somehow female collection of ballet theatres</p>
</blockquote>
<p>I could go on all day. To save myself the effort of doing this, I automated it.
So now there's a...</p>
<h3><a href="https://twitter.com/vortidplenigilo">Twitter bot: vortidplenigilo</a></h3>
<p><code>vortidplenigilo</code>:<br>
<em>tool to make [something] full of word derivatives</em>, from <code>vorto + ido + plena + igi + ilo</code>.</p>
<p>Every hour (or so), it tweets a random root (grabbed from a <a href="http://www.esperanto-panorama.net/vortaro/eoen.htm">dictionary</a>)
with a random number of suffixes and prefixes. Code is in the same repo as
before, see <a href="https://github.com/corcra/esperanto/blob/master/vortidplenigilo.py"><code>vortidplenigilo.py</code></a>. It chooses how many affixes to use based on
two draws from Poisson distributions, preferring fewer prefixes. Since it's
limited by Twitter's 140 character limit, those with <code>n_s</code> or <code>n_p</code> above 1 tend
not to make it, unfortunately. Future work will shorten the descriptions so I
can squeeze more in. The selection of <em>which</em> affix is not entirely random,
however...</p>
<h3>Making affixes make sense</h3>
<p>Not every affix can go on every type of word. Some take nouns and output nouns,
other take nouns and output adjectives, etc. The <a href="http://donh.best.vwh.net/Esperanto/affixes.html">page I grabbed the affixes from</a>
thankfully lists which <code>transformations</code> are valid, so I encoded that. See <code>affixes.py</code>
for what is essentially a rendering of aforementioned page into python. The
sort of information I recorded is explicit in this class definition:</p>
<div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">affix</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="sa">u</span><span class="s1">'undefined'</span><span class="p">,</span>
<span class="n">transformations</span><span class="o">=</span><span class="p">{</span><span class="s1">'x'</span><span class="p">:</span> <span class="s1">'x'</span><span class="p">},</span>
<span class="n">explanation</span><span class="o">=</span><span class="s1">'undefined'</span><span class="p">,</span>
<span class="n">conflicts</span><span class="o">=</span><span class="p">{},</span>
<span class="n">category</span><span class="o">=</span><span class="s1">'undefined'</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span>
<span class="bp">self</span><span class="o">.</span><span class="n">transformations</span> <span class="o">=</span> <span class="n">transformations</span>
<span class="bp">self</span><span class="o">.</span><span class="n">explanation</span> <span class="o">=</span> <span class="n">explanation</span>
<span class="bp">self</span><span class="o">.</span><span class="n">conflicts</span> <span class="o">=</span> <span class="n">conflicts</span>
<span class="bp">self</span><span class="o">.</span><span class="n">category</span> <span class="o">=</span> <span class="n">category</span>
</pre></div>
<ul>
<li>
<p><code>transformations</code> is a dict of valid word-type maps, based on word-endings
(since Esperanto is so very regular in this regard). In practice these
dictionaries either have one element (e.g. <code>'a': 'o'</code>) or all (<code>'i':'i' for 'i'
in valid_word_endings</code>), but in theory one could have an affix which turns
adjectives into verbs and nouns into adjectives, I suppose. Or something like
that. My code is future-proofed against complicated Esperanto dystopias. The
point is that as the compound word is created, I keep track of its current 'word
type' and make sure I only accept affixes which are compatible with that (and
then it gets a new type from its new affix, and so on). This all takes place in
the <code>make_soup</code> function in <code>soup.py</code>.</p>
</li>
<li>
<p><code>explanation</code> is just the string explaining the affix.</p>
</li>
<li>
<p><code>conflicts</code> is a list of other affixes (by <code>name</code>) which I forbid to co-exist
in a compound word. The idea is to prevent illogical things like</p>
</li>
</ul>
<blockquote>
<p><code>arbarero</code>: one of a collection of trees... a tree<br>
<code>dormigiĝi</code>: to become made to be asleep... to sleep</p>
</blockquote>
<p>I'm not entirely convinced I want this, though. For example,</p>
<blockquote>
<p><code>hundetego</code>: huge small dog</p>
</blockquote>
<p>sort of makes sense. Jury is out on this decision.</p>
<ul>
<li>The final attribute, <code>category</code>, records what <em>type</em> of affix it is, and is
currently not used. Future version could restrict to <em>true affixes</em> or
<em>adjective suffixes</em> or something. Future proof, yo. Maybe.</li>
</ul>
<p>One of its first tweets was beautifully meta:
<a href="https://twitter.com/vortidplenigilo/status/666914030615928832"><img src="images/vortidplenigilo.png" class="center"></a></p>
<blockquote>
<p><code>morfologiido</code>: offspring of morphology</p>
</blockquote>
<hr>
<h3>Feedback</h3>
<p>I would gladly welcome comments/ideas on the <a href="https://github.com/corcra/esperanto">GitHub repository</a>,
be it language suggestions or corrections (since I am still a <em>komencisto</em>), code
fixes, ideas for automatically producing 'interpretations' of the generated
words, or anything else. The contents of <a href="https://github.com/corcra/esperanto/blob/master/affixes.py"><code>affixes.py</code></a> might also be useful
for other people doing things with Esperanto. </p>esperanto in forty-five seconds2015-10-31T00:00:00+00:002015-10-31T00:00:00+00:00corcratag:None,2015-10-31:lang/2015-10-31-esperanto-done-quick.html<p><a href="https://en.wikipedia.org/wiki/Esperanto">Esperanto</a> is a constructed international auxiliary language designed to be simple and easy to learn. It achieves this by having a small vocabulary and very regular grammar. It's quite influenced by Indo-European (particularly Romance) languages, so knowing some of those helps a lot.</p>
<p>This post is not intended to be …</p><p><a href="https://en.wikipedia.org/wiki/Esperanto">Esperanto</a> is a constructed international auxiliary language designed to be simple and easy to learn. It achieves this by having a small vocabulary and very regular grammar. It's quite influenced by Indo-European (particularly Romance) languages, so knowing some of those helps a lot.</p>
<p>This post is not intended to be exhautive or comprehensive, I mostly want to express how simple the grammar is and highlight other cool things. </p>
<p><em>Forty-five seconds is about how long it takes me to read this page, but excludes time spent on trying to remember things. If you want to <b>actually</b> learn, check out the links at the end.</em></p>
<h3>Gender?</h3>
<p>Nope. The definite article is 'la' for everything.
There is no indefinite article.</p>
<h3>Nouns?</h3>
<p>They end in '<strong>-o</strong>':</p>
<blockquote>
<p><strong>hundo</strong>: dog (like the German <em>Hund</em>)<br>
<strong>feliĉo</strong>: happiness (like the Spanish <em>felicidad</em>)<br>
<strong>fromaĝo</strong>: cheese (like the French <em>fromage</em>)<br>
<strong>arbo</strong>: tree (like the Latin <em>arbor</em>, Spanish <em>àrbol</em>)</p>
</blockquote>
<p>To pluralise, add '<strong>-j</strong>':</p>
<blockquote>
<p><strong>hundoj</strong>: dogs<br>
<strong>arboj</strong>: trees</p>
</blockquote>
<h3>Pronouns?</h3>
<p>This is just a list but people like these things.</p>
<blockquote>
<p><strong>mi</strong>: me<br>
<strong>vi</strong>: you <br>
<strong>ŝi</strong>: she<br>
<strong>li</strong>: he <br>
<strong>ĝi</strong>: it<br>
<strong>ni</strong>: we <br>
<strong>ili</strong>: they </p>
</blockquote>
<p>There's no plural 'you', for some reason.</p>
<h3>Verbs?</h3>
<p>Conjugation by person isn't a thing. One ending for each tense. Using <strong>esti</strong> (to be):</p>
<ul>
<li><strong>-i</strong>: <em>Infinitive</em>: est<b>i</b>: to be</li>
<li><strong>-as</strong>: <em>Present</em>: est<b>as</b>: is</li>
<li><strong>-is</strong>: <em>Past</em>: est<b>is</b>: was</li>
<li><strong>-os</strong>: <em>Future</em>: est<b>os</b>: will be</li>
<li><strong>-us</strong>: <em>Conditional</em>: est<b>us</b>: would be</li>
</ul>
<p>Examples:</p>
<blockquote>
<p>Mi estas...: <em>I am...</em><br>
La arboj estis...: <em>the trees were...</em> <br>
Feliĉo estus...: <em>happiness would be...</em></p>
</blockquote>
<h3>Objects?</h3>
<p>Denote the object of a verb (<em>accusative case</em>) with '<strong>-n</strong>':</p>
<blockquote>
<p>La hundo manĝas la fromaĝo<b>n</b>: <em>The dog eats the cheese</em></p>
</blockquote>
<p>This stacks with plurals:</p>
<blockquote>
<p>Viro vidas la arbo<b>jn</b>: <em>A man sees the trees</em></p>
</blockquote>
<h3>Adjectives?</h3>
<p>They end in '<strong>-a</strong>':</p>
<blockquote>
<p><strong>bela</strong>: beautiful <br>
<strong>rapida</strong>: fast <br>
<strong>malrapida</strong>: slow</p>
</blockquote>
<p>Examples: (note, they must match the noun in case and number),</p>
<blockquote>
<p>Mi estas bela: <em>I am beautiful</em><br>
La rapida<b>j</b> viro<b>j</b>: <em>The fast men</em> <br>
La rapida bruna vulpo transsaltas la pigra<b>n</b> hundo<b>n</b>: <em>The quick brown fox jumps over the lazy dog</em>.<a href="#1"><sup>1</sup></a></p>
</blockquote>
<h3>Affixes?</h3>
<p>Observe rapida (fast) → <b>m</b>alrapida (slow).</p>
<p><strong>mal</strong> is a prefix for <em>negation</em>. Esperanto has <a href="https://en.wiktionary.org/wiki/Category:Esperanto_suffixes">very</a> <a href="http://en.lernu.net/lernado/gramatiko/konciza/afiksoj.php">many</a> affixes (prefixes or suffixes) which modify word roots to form other words. This is where it gets <em>really cool</em> and therefore beyond the scope of this post. Briefly, some examples:</p>
<ul>
<li>hundo → hund<b>id</b>o: <em>dog</em> → <em>puppy</em> (offspring of dog)</li>
<li>ĵurnalo → ĵurnal<b>ist</b>o: <em>newspaper</em> → <em>journalist</em> (professional of newspaper)</li>
<li>salo → sal<b>er</b>o: <em>salt</em> → <em>grain of salt</em> (one of the many same salt objects)</li>
</ul>
<h3>Conclusion</h3>
<p>This was just a taste of Esperanto. For more, see <a href="https://www.duolingo.com/course/eo/en/Learn-Esperanto-Online">Duolingo</a>, <a href="http://en.lernu.net/lernado/gramatiko/konciza/index.php">grammar at lernu!</a>, <a href="https://www.youtube.com/watch?v=mWbyXVSiCxw&list=PLC8C7DF5ECBAA4E5E">Mazi en Gondolando</a>.</p>
<hr>
<p><a name="1">[1]</a> This English pangram is not an Esperanto pangram! From <a href="http://clagnut.com/blog/2380">here</a>, an Esperanto pangram would be:</p>
<blockquote>
<p>Laŭ Ludoviko Zamenhof bongustas freŝa ĉeĥa manĝaĵo kun spicoj.<br>
<em>According to Ludwig Zamenhof, fresh Czech food with spices tastes good.</em></p>
</blockquote>I will [not] follow you into the darknet (radical networks)2015-10-27T13:37:00+00:002015-10-27T13:37:00+00:00corcratag:None,2015-10-27:sec/2015-10-27-radical-networks.html<p>Last weekend I presented with two friends (<a href="https://twitter.com/huertanix/">huertanix</a> and <a href="https://twitter.com/carolinesinders">Caroline Sinders</a>) at the first ever <a href="http://radicalnetworks.org/">Radical Networks</a> conference. Our talk was originally called 'Blogging on the Darknet' but after a questionably productive co-working session we changed it to 'I Will Follow You Into the Darknet', after a Death Cab for …</p><p>Last weekend I presented with two friends (<a href="https://twitter.com/huertanix/">huertanix</a> and <a href="https://twitter.com/carolinesinders">Caroline Sinders</a>) at the first ever <a href="http://radicalnetworks.org/">Radical Networks</a> conference. Our talk was originally called 'Blogging on the Darknet' but after a questionably productive co-working session we changed it to 'I Will Follow You Into the Darknet', after a Death Cab for Cutie song. Caroline even <a href="https://twitter.com/carolinesinders/status/651509665705127936">wrote lyrics</a> for it. I sort of hate the term 'darknet' but until the Tor Project settle on a nomenclature for location-hidden services (and their related -ome<a href="#1"><sup>1</sup></a>) it'll have to do. And that is how terms become accepted. Sorry, world.</p>
<p>Anyway, the slides are <a href="http://fu.io/followdarknet">here</a> (warning: gifs, dank memes) and there is a video recording <a href="http://livestream.com/internetsociety/radicalnetworks/videos/102829121">here</a>, and have an embedded version too:</p>
<iframe src="https://livestream.com/accounts/686369/events/4317418/videos/102829121/player?width=640&height=360&autoPlay=false&mute=false" width="640" height="360" frameborder="0" scrolling="no"></iframe>
<p>Full disclosure: we didn't practice and most of our working sessions devolved into expeditions into giphy, in case that wasn't obvious. I think the last section could have done with being an interactive/hands-on workshop, but we only had an hour slot. And then <a href="https://twitter.com/brianloveswords">@brianloveswords</a> turned (the technical part of) our talk into <a href="https://github.com/brianloveswords/onion-ghost-blog">two commands</a>. Also, in case there was <em>any uncertainty</em>, I'm not an opsec professional. Do those even exist?</p>
<p>The rest of the conference was really good, although I missed a lot of Saturday due to occupying a table of cannolis and devising grandiose schemes. Events like this are great for inspiring ideas, so my todo list is ever-growing. In an attempt to avoid the lure of shiny new projects, I'm disallowing myself from starting new things before I've cleared some of my backlog. Let's see how well that goes.</p>
<p>Relevant to this website, one result of the conference was (after much discussion of TLDs) learning that .io belongs to the British Indian Ocean Territory, which has an unpleasant colonial history: the native Chagossians were forced out by the British in the 60s/70s so that the USA could set up a military base, which has <a href="http://www.theguardian.com/world/2015/jan/30/cia-interrogation-diego-garcia-lawrence-wilkerson">apparently been used in the CIA's rendition (and torture) program!</a> It's unclear how much actually <em>having</em> a .io domain contributes to any of this, of course, but I'm ashamed I didn't know any of this before. It's easy to forget that country TLDs come with political baggage.</p>
<hr>
<p><a name="1">[1]</a> An awful idea which just occurred to me is 'onion'-ome, after genome and proteome and transcriptome and epitranscriptome and connectome and interactome and literome, etc. In the grim future of Hello Kitty, everything is an ome.</p>thoughts from mlss 2015 tübingen2015-07-30T13:37:00+01:002015-07-30T13:37:00+01:00corcratag:None,2015-07-30:ml/2015-07-30-mlss2015.html<p>I recently attended the <a href="http://mlss.tuebingen.mpg.de/2015/index.html">Machine Learning Summer School at the MPI in Tübingen</a>. This wasn't my first time at an event like this - I attended the <a href="http://ml.dcs.shef.ac.uk/gpss/gpss14/">Gaussian Process 'Summer' School</a> in September 2014 - but the MLSS is a lot bigger/diverse. I'm fairly sure I didn't even speak to all …</p><p>I recently attended the <a href="http://mlss.tuebingen.mpg.de/2015/index.html">Machine Learning Summer School at the MPI in Tübingen</a>. This wasn't my first time at an event like this - I attended the <a href="http://ml.dcs.shef.ac.uk/gpss/gpss14/">Gaussian Process 'Summer' School</a> in September 2014 - but the MLSS is a lot bigger/diverse. I'm fairly sure I didn't even speak to all the other participants (unfortunately).</p>
<p>The basic format is lectures all day (9am til roughly 5pm) and various academic or social activities in the evenings. I foolishly though it would be possible to get lots of work done in the free time, which was wrong on two counts: free time was limited, and the hostel had essentially no WiFi. By that I mean it was impressively bad: pings of the order 5s, packet loss above 50%. Free café WiFi is also harder to find in Tübingen than in NYC (somehow!), so by the end of the two weeks, MLSS participants could be found sitting near eduroam hotspots across the town.</p>
<p>Luckily there are better things to do at a summer school than struggle with laggy ssh tunnels. The lectures provided good exposure various topics within machine learning, although a 3-hour course is necessarily limited in depth. Most of the lectures were recorded and will probably be <a href="http://webdav.tuebingen.mpg.de/mlss2013/2015/speakers.html">here</a> eventually. Those from 2013 are still available <a href="http://webdav.tuebingen.mpg.de/mlss2013/2013/index.html">here</a>. There are also more from other MLSS venues <a href="http://videolectures.net/site/search/?q=mlss">here</a>.</p>
<p>My favourites were Tamara Broderick's <em>Bayesian Nonparametrics</em> and Zoubin Ghahramani's <em>Bayesian Inference</em> (note my bias). Michael Hirsch's <em>Computational Imaging</em> and Michael Black's <em>Learning Human Body Shape</em> were also enjoyable, largely due to demonstrations. The former briefly covered MIT's <a href="https://people.csail.mit.edu/mrub/VisualMic/">visual microphone</a> which prompted a similar level of disquiet as it did on infosec twitter, although more fascination. The unearthly sounds of the reconstructions do little to ease the creep level.</p>
<p>My favourite session overall was the practical from Frank Wood and Brooks Paige on <em>Probabilistic Programming</em> (<a href="https://bitbucket.org/probprog/mlss2015">bitbucket repo</a>), possibly because I am a nascent Clojure fan, or maybe I just love sampling. I'm also quite enthusiastic about abstracting away implementation details and focusing on models, which <a href="http://www.robots.ox.ac.uk/~fwood/anglican/">Anglican</a> facilitates. How much use I'll make of it in my own research has yet to be determined.</p>
<p>Something which cannot be replicated via video lectures or git repos (yet) is interaction with other participants. As I mentioned, there were a lot of us (about 100), and the poster sessions were probably the best opportunity to talk science. I'm not sure how participants were selected but I was impressed by the diversity of research represented. It turns out not <em>everyone</em> is throwing convnets at everything (but maybe they should be?). There was also a lot more theory than I was expecting, which is what happens when you assume your biased sample (of largely-applied colleagues) is representative of the whole. Lesson learned. I didn't take any notes at the poster sessions (nor did I read all of the posters), so I'll just mention a few that stand out in my memory (and have something concrete to link to).</p>
<ul>
<li><a href="http://www.mpi-sws.org/~mzafar/">Muhammad Bilal Zafar</a> had a poster about <a href="http://www.mpi-sws.org/~mzafar/papers/fatml_15.pdf">Fairness Constraints: A Mechanism for Fair Classification</a>. Quoting from the paper, </li>
</ul>
<blockquote>
<p><em>"Fairness prevents a classifier from outputting predictions correlated with certain sensitive attributes in the data."</em></p>
</blockquote>
<p>I was really excited to see a poster about fairness, especially having just read <a href="http://jeremykun.com/2015/07/13/what-does-it-mean-for-an-algorithm-to-be-fair/">"What Does it Mean for an Algorithm to be Fair?"</a>. The danger exists for people to believe that the recommendations from a machine learning algorithm are 'fair' (for some nebulous definition of fair, likely including 'not racist' and 'not sexist'), which could be used to avoid addressing systemic social injustices. It's important for machine learning researchers/users to stress that the output of learning algorithm is a function of its training data (madness, I know), and as long as our historical data contains biases, models trained on it will have them too. That is, unless we do something about it. I'm sure there are more subtle factors at play that I'm not aware of, but I'm glad that these issues are being considered by the research community.</p>
<ul>
<li>
<p><a href="http://people.idsia.ch/~greff/index.html">Klaus Greff</a> presented a poster about an experiment-management tool he created called <a href="https://github.com/IDSIA/sacred">Sacred</a>. (The name is a reference to Monty Python's <a href="https://www.youtube.com/watch?v=fUspLVStPbk">Every Sperm is Sacred</a>). This obviously isn't research, but it seems extremely useful. It records things like config options, a snapshot of the source code(!), runtime trace(s), and saves them in a (mongoDB) database. I already have a semi-elaborate setup for running reproducible experiments (the details of which are too gory and shameful to provide), but this seems more pleasant and sane.</p>
</li>
<li>
<p><a href="http://www.robots.ox.ac.uk/~twgr/">Tom Rainforth</a> had a poster about <a href="http://arxiv.org/pdf/1507.05444v2.pdf">Canonical Correlation Forests</a> which I didn't actually get to look at (I was in the same poster session), but the gist I got from a chat in the pub is that they're better than random forests (my brain has a very aggressive compression algorithm, clearly). I'll need to read the paper. I have a picture of him explaining the poster to someone on the bus after the poster session, demonstrating that science never rests.</p>
</li>
<li>
<p>My friend <a href="http://www.maillard.it/">Jean Maillard</a> had a poster on <a href="https://aclweb.org/anthology/K/K15/K15-1035.pdf">Learning Adjective Meanings with a Tensor-Based Skip-Gram Model</a>. This was by far the most similar to mine (my poster was also on distributional semantics), although this paper focuses moreso on language-modelling, by representing adjectives as matrices. I'm amused that Jean and I started off doing something entirely different (at the time, Part III in Mathematics at Cambridge, mostly flipping tables over quantum algorithms) and then converged (if only temporarily, for me) on something that is (at least by MLSS standards) <em>somewhat</em> obscure. Maybe there was something in the water at St. John's.</p>
</li>
</ul>
<p>There were also lots of opportunities to talk non-science. On the last afternoon, a straw poll was conducted on the viability of human-level AI during our lifetime. The majority present (n ~ 10) felt it wasn't going to happen, which seems to go against popular opinion on the matter (at least judging by recent articles about the threat of such AIs). Maybe grad students are too pessimistic (optimistic?) a group, or we succumbed to our small sample size. The poll wasn't even conducted in secret.</p>
<p>Another outcome of the MLSS is that I reaffirmed my desire to write a <em>Gaussian Processes for Biologists</em> tutorial. <em>Biologist</em> here really means 'anyone lacking a strong mathematical background' (hopefully in the future it will be offensive for me to use biologist as a proxy for that). I'd originally planned to do this after the GPSS last year, partially out of GP evangelism (all the people doing simple linear regression could be doing GP regression!) and partially to deepen my own understanding (one learns much through teaching), but progress stalled due to lack of interest. Interest is briefly re-ignited, so maybe I'll actually do it this time[citation needed].</p>quotes in awk2015-05-27T00:00:00+01:002015-05-27T00:00:00+01:00corcratag:None,2015-05-27:tips/2015-05-27-quotes-in-awk.html<p>Lazily trying to paste a long list of strings into python, which means I need things wrapped in quotes (and commas, but I'm excluding them from this example cause they're easy). Grabbing the strings from a file using <code>awk</code>, but since quotes (apostrophes) are special in <code>awk</code> this messes things …</p><p>Lazily trying to paste a long list of strings into python, which means I need things wrapped in quotes (and commas, but I'm excluding them from this example cause they're easy). Grabbing the strings from a file using <code>awk</code>, but since quotes (apostrophes) are special in <code>awk</code> this messes things up a little. The way to do it is either</p>
<div class="highlight"><pre><span></span>awk '{ print "'"'"'"$F"'"'"'" }' file.txt
</pre></div>
<p>(I kid you not), or</p>
<div class="highlight"><pre><span></span>awk '{ print "\047"$F }' file.txt
</pre></div>
<p>where <code>$F</code> is whatever field of <code>file.txt</code> is interesting.</p>
<p>I think the second method might be a bit nicer.</p>density plots without outlines in ggplot22015-05-20T13:37:00+01:002015-05-20T13:37:00+01:00corcratag:None,2015-05-20:tips/2015-05-20-density-ggplot2.html<p>It is not:</p>
<ul>
<li>anything in the <code>aes</code> of the <code>ggplot</code> call </li>
<li><code>color=FALSE</code> </li>
<li><code>color=NULL</code></li>
</ul>
<p>It is:</p>
<ul>
<li><code>color=NA</code> in the <code>geom_density</code> call</li>
</ul>
<p>e.g.</p>
<div class="highlight"><pre><span></span><span class="nf">ggplot</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="nf">aes</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="n">value</span><span class="p">,</span> <span class="n">fill</span><span class="o">=</span><span class="n">grouping</span><span class="p">))</span><span class="o">+</span><span class="nf">geom_density</span><span class="p">(</span><span class="o"><</span><span class="n">b</span><span class="o">></span><span class="n">color</span><span class="o">=</span><span class="kc">NA</span><span class="o"></</span><span class="n">b</span><span class="o">></span><span class="p">)</span>
</pre></div>
<p>Example (this is some real data I'm currently working with, but I've changed …</p><p>It is not:</p>
<ul>
<li>anything in the <code>aes</code> of the <code>ggplot</code> call </li>
<li><code>color=FALSE</code> </li>
<li><code>color=NULL</code></li>
</ul>
<p>It is:</p>
<ul>
<li><code>color=NA</code> in the <code>geom_density</code> call</li>
</ul>
<p>e.g.</p>
<div class="highlight"><pre><span></span><span class="nf">ggplot</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="nf">aes</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="n">value</span><span class="p">,</span> <span class="n">fill</span><span class="o">=</span><span class="n">grouping</span><span class="p">))</span><span class="o">+</span><span class="nf">geom_density</span><span class="p">(</span><span class="o"><</span><span class="n">b</span><span class="o">></span><span class="n">color</span><span class="o">=</span><span class="kc">NA</span><span class="o"></</span><span class="n">b</span><span class="o">></span><span class="p">)</span>
</pre></div>
<p>Example (this is some real data I'm currently working with, but I've changed the labels so it's hopefully not meaningful):</p>
<p><img src="images/density_outline.png" class="center" style="width: 40vw;"/></p>
<p>Code:</p>
<div class="highlight"><pre><span></span><span class="nf">ggplot</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="nf">aes</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="n">variable</span><span class="p">,</span> <span class="n">fill</span><span class="o">=</span><span class="n">switch</span><span class="p">))</span> <span class="o">+</span>
<span class="nf">geom_density</span><span class="p">(</span><span class="n">alpha</span><span class="o">=</span><span class="m">0.7</span><span class="p">,</span> <span class="n">color</span><span class="o">=</span><span class="kc">NA</span><span class="p">)</span> <span class="o">+</span>
<span class="nf">facet_grid</span><span class="p">(</span><span class="n">case</span><span class="o">~</span><span class="n">condition</span><span class="p">)</span> <span class="o">+</span>
<span class="nf">xlim</span><span class="p">(</span><span class="m">-3</span><span class="p">,</span><span class="m">3</span><span class="p">)</span> <span class="o">+</span> <span class="nf">theme_bw</span><span class="p">()</span> <span class="o">+</span>
<span class="nf">scale_fill_manual</span><span class="p">(</span><span class="n">values</span><span class="o">=</span><span class="nf">c</span><span class="p">(</span><span class="s">"darkorchid2"</span><span class="p">,</span><span class="s">"darkturquoise"</span><span class="p">))</span> <span class="o">+</span>
<span class="nf">ggtitle</span><span class="p">(</span><span class="s">"density plots with no outline"</span><span class="p">)</span>
</pre></div>just the tips2015-05-20T00:00:00+01:002015-05-20T00:00:00+01:00corcratag:None,2015-05-20:meta/2015-05-20-just-the-tips.html<p>For fear of turning this blog into a <a href="https://en.wikipedia.org/wiki/Chinese_restaurant_process">Chinese Restaurant Process</a> I've spawned a new category, called <font class="tips">tips</font>. This category is the closest to my original vision for a PhD-blog, where I would write down useful things as I learned them. It turns out that's not very sustainable (PhD involves …</p><p>For fear of turning this blog into a <a href="https://en.wikipedia.org/wiki/Chinese_restaurant_process">Chinese Restaurant Process</a> I've spawned a new category, called <font class="tips">tips</font>. This category is the closest to my original vision for a PhD-blog, where I would write down useful things as I learned them. It turns out that's not very sustainable (PhD involves a lot of learning). Every time I went to write a post I found it difficult to resist the urge to make it very comprehensive and pedagogical, which ended up in me carefully studying <code>man</code> pages.</p>
<p>The <font class="tips">tips</font> category will contain posts that are unashamedly brief and perhaps shamefully trivial. If I have a simple problem that took me <em>too long</em> (like over 5 minutes) to solve, I'll put my solution in <font class="tips">tips</font>. As ever, making hard categorical assignments to soft things like blog posts containing multiple topics is a fool's errand, but I'll deal with it as it comes. Perhaps I should be using <a href="https://en.wikipedia.org/wiki/Latent_Dirichlet_allocation">LDA</a>, or like, tags or something.</p>pgp 1012015-04-28T13:37:00+01:002015-04-28T13:37:00+01:00corcratag:None,2015-04-28:sec/2015-04-28-pgp-101.html<p>I gave an 'Introduction to PGP'-type talk/tutorial at <a href="https://twitter.com/cryptoharlem">CryptoHarlem</a> last night. PGP can be a little confusing and it gets a lot of criticism for being unusable, so I tried to focus on the higher-level aspects, like how it works and why you want that. I fear it ended …</p><p>I gave an 'Introduction to PGP'-type talk/tutorial at <a href="https://twitter.com/cryptoharlem">CryptoHarlem</a> last night. PGP can be a little confusing and it gets a lot of criticism for being unusable, so I tried to focus on the higher-level aspects, like how it works and why you want that. I fear it ended up being a little too theoretical, but my rationale was that a person who understands how PGP achieves what it does will find it less confusing overall. That said, I have always fallen on the 'theory then application' side of the fence when this comes up, so I admit my bias.</p>
<p>I resisted the temptation to make it insufferably long and all-encompassing, so an observer may note that many details have been glossed over. My plan is to incrementally improve it until I can't stand it, so feedback is greatly appreciated. I'm also thinking to make a <code>pgp_102</code> which covers things like subkeys, key-signing, and anything else that seems advanced-but-actually-useful.</p>
<h2><a href="pdfs/pgp_101.pdf">Link to the slides</a></h2>
<p>I think it also bears mentioning that the entire presentation was an excuse to personally indulge in <a href="https://thenounproject.com/">The Noun Project</a>.</p>
<p>And unrelatedly...<br>
<a href='https://twitter.com/corcra/status/592772656878977024'><img src="images/pgpond.png" style='width: 350px;'></a></p>aligning vectors (animation)2015-04-09T13:37:00+01:002015-04-09T13:37:00+01:00corcratag:None,2015-04-09:ml/2015-04-09-aligning-vectors-animation.html<p>I'm working on an embedding procedure for placing <em>things</em> into vector spaces. Things which might not normally live in a vector space (although in a sense we all live in a Lorentzian manifold). The basic idea is to take a model, present a bunch of examples of these objects relating …</p><p>I'm working on an embedding procedure for placing <em>things</em> into vector spaces. Things which might not normally live in a vector space (although in a sense we all live in a Lorentzian manifold). The basic idea is to take a model, present a bunch of examples of these objects relating to each other (outside of any notion of a metric), and then it figures out where to put them. <em>(In the event of me getting my model to do anything actually useful, I will provide excessive technical detail, but that's not the objective here)</em>. This evening I remembered that 2 dimensions are very easy to visualise, so I made an animation of how the objects move in the space as training progresses (number of training examples is depicted in the plot title).</p>
<p>The example here is exceedingly trivial - five objects, two pairs of which are designed (by way of engineering the training data) to end up together and apart (colour-coded), and one loner who goes wherever. So they're not so much learning to agree as learning to jealously cling to their partner.</p>
<p><img src="https://corcra.github.io/assets/w5.gif" class="center"/></p>
<p>Look at them twitch! Stochastic gradient descent in action. I'm tempted to make more of these with different learning rates and see how badly I can get it to break, but I foolishly started doing this <em>too late</em>, so I'll save it for next time. (Also next time: evolving energy surfaces).</p>lá fhéile pádraig2015-03-17T00:00:00+00:002015-03-17T00:00:00+00:00corcratag:None,2015-03-17:lang/2015-03-17-la-fheile-padraig.html<p>Today is St. Patrick's day, which means there's a lot of this online:</p>
<blockquote>
<p>Lá Féile Pádraig shona duit</p>
</blockquote>
<p>or this:</p>
<blockquote>
<p>Lá Fhéile Phádraig sona duit</p>
</blockquote>
<p>or basically any variation of:</p>
<blockquote>
<p>Lá F(h)éile P(h)ádraig s(h)ona duit</p>
</blockquote>
<p>which <em>all</em> roughly mean 'Happy St. Patrick's Day' in …</p><p>Today is St. Patrick's day, which means there's a lot of this online:</p>
<blockquote>
<p>Lá Féile Pádraig shona duit</p>
</blockquote>
<p>or this:</p>
<blockquote>
<p>Lá Fhéile Phádraig sona duit</p>
</blockquote>
<p>or basically any variation of:</p>
<blockquote>
<p>Lá F(h)éile P(h)ádraig s(h)ona duit</p>
</blockquote>
<p>which <em>all</em> roughly mean 'Happy St. Patrick's Day' in Irish, but some of which are grammatically incorrect. (<strong>Note</strong>: I'm not going to get into pronunciation here, but for the curious, <a href="https://www.youtube.com/watch?v=Pop2ivFUOw8">here's a video</a>.)</p>
<p>When I was learning Irish in school this was generally the trouble. The meaning is clear most of the time, but where or when to put the séimhiú (lenition - those 'h's above), the urú (eclipsis), or the additional 'i's (slendering) was never particularly clear. I got through Irish on the <em>vague feeling</em> about what was correct, mostly based off the sound of the thing<a href="#1">[1]</a>. </p>
<p>On some recent trip home to Dublin I bought a book on Irish grammar in some optimistic hope of fixing the situation. Inside this book must be contained a set of concise and logical rules, the mastery of which will enable me to unambiguously resolve problems like the above. <em>(hahahaha)</em></p>
<p>Let's break the phrase down. Translated literally (<em>and with caveats</em>)</p>
<blockquote>
<p>lá fhéile Pádraig -> the feast day of Patrick<br>
X shona duit -> happy X to you</p>
</blockquote>
<p>The second one is a bit easier so we can get that out of the way.</p>
<p>'Sona' means 'happy', and as an adjective it is modified to agree with its noun. As a member of the <em>third declension</em>, 'sona' undergoes no change to its <em>ending</em>, but it does pick up a séimhiú (h) when it's paired with a <em>feminine</em> noun.</p>
<p>'Duit' is a prepositional pronoun, which in this case means</p>
<blockquote>
<p>duit = do + tú = to + you = to you</p>
</blockquote>
<p>the 'to' of 'do' is in the proposition sense (don't try to use it to form infinitives of verbs, or anything like that)<a href="#2">[2]</a>.</p>
<p>So we really have</p>
<blockquote>
<p>XY sona duit -> happy XY (masc) to you<br>
XX shona duit -> happy XX (fem) to you</p>
</blockquote>
<p>Now for the first part. This is where things go wrong for me.</p>
<p>'Lá' means 'day'. It is masculine.<br>
'Féile' means 'feast'. It is feminine.</p>
<p><a href="http://www.tearma.ie/Search.aspx?term=l%C3%A1+f%C3%A9ile">Tearma.ie</a> seems to think that one makes 'feast day' with 'lá féile', which seems to agree with my grammar book. In the compound noun, 'féile' <em>should</em> go into the tuiseal ginideach (genitive case). As a <em>fourth declension</em> noun, this means it undergoes <em>no change</em>. The resultant word ('feast day') is <em>masculine</em> (the gender is taken from the first noun), so we'll follow it up with 'sona'.</p>
<p><em>However</em>, <a href="http://www.tearma.ie/Search.aspx?term=L%C3%A1+Fh%C3%A9ile+P%C3%A1draig">tearma.ie</a> also says St. Patrick's day is 'Lá F<strong>h</strong>éile Pádraig', so something is going on here. Is the presence of the 'Pádraig' complicating the issue?</p>
<p>The answer that I've found for this is: <strong>yes</strong>. My grammar book is silent on the topic of this slightly-advanced compound noun case. According to <a href="http://nualeargais.ie/gnag/subst2.htm#genitivverwend">Nua Leargais</a>, when two genitives come together (as we would naïvely try for 'féile' and 'Pádraig' after 'lá'), we encounter the <em>functional genitive</em>. In this case:</p>
<ol>
<li>The first word is in the 'functional genitive', and its form is that of a <em>lenited</em>, nominative form. So this gives us 'f<strong>h</strong>éile', even though the <em>genitive</em> of 'féile' is 'féile', as I mentioned before.</li>
<li>The second word is in the genitive. The question is then...</li>
</ol>
<p><em>What the hell is the genitive of Pádraig?</em></p>
<p>The answer seems to be 'it depends'. Situations like this are why I end up feeling like 'Phádraig' and 'Pádraig' are equally valid and get confused. It seems like:</p>
<p><em>In general</em>, the genitive of 'Pádraig' is 'P<strong>h</strong>ádraig' (so 'Patrick's house' is 'teach Phádraig'). This is supported by <a href="http://www.tearma.ie/Search.aspx?term=Pádraig">tearma.ie</a>. However, in special cases it <em>doesn't change</em>, and those cases include 'after féile' and 'after naomh'<a href="#3">[3]</a>.</p>
<p>So to summarise, if you want to say 'Happy St. Patrick's Day' in Irish, and be (probably) grammatically correct about it, it's:</p>
<h2>Lá Fhéile Pádraig sona duit!</h2>
<p>And now you know.</p>
<hr>
<p><a name="1">[1]</a> This turned out to be sufficient to get an A1 in the exam (somehow), but I'll never feel capable of <em>teaching</em> anyone the language if I can't explain why things are how they are.</p>
<p><a name="2">[2]</a> We learned the prepositional pronouns using songs and hand gestures in school, so they're indelibly seared in my memory. Here's the full list of the 'do' ones:</p>
<blockquote>
<p>dom = to me<br>
duit = to you<br>
dó = to him/it<br>
di = to her/it<br>
dúinn = to us<br>
daoibh = to you (plural)<br>
dóibh = to them</p>
</blockquote>
<p>And <a href="http://www.irishpage.com/quiz/preppron.htm">here's a page</a> with some more. You might notice that 'do' means 'to/for' there, which is true, but that is beyond the scope of this post.</p>
<p><a name="3">[3]</a> 'Naomh' means 'saint', so if you, like me, went to a school named after St. Patrick and grew up hearing 'Naomh Pádraig' all the time, you might be forgiven in thinking that's its genitive form.</p>
<hr>
<p>Here are some pages I found useful/interesting while trying to resolve this problem:</p>
<ul>
<li><a href="http://www.daltai.com/discus/messages/13510/50292.html?1268966813">Don't lenite names after 'féile', also some functional genitive</a></li>
<li><a href="http://www.daltai.com/discus/messages/13510/25063.html?1179788462">Combining nouns but possibly not aware of the functional genitive</a></li>
<li><a href="http://heatherrosejones.com/names/goedelic/irishgenitives.html">More detail about the genitive of Irish names than I have time for</a></li>
<li><a href="https://en.wikipedia.org/wiki/Irish_initial_mutations#Environments_of_lenition">When to lenite nouns?</a></li>
<li><a href="http://www.googlefight.com/index.php?word1=naomh+p%E1draig&word2=naomh+ph%E1draig">Naomh Pádraig wins a google fight against Naomh Phádraig, confirming my intuition</a></li>
<li><a href="http://nualeargais.ie/gnag/lenition.htm">Nua Leargais on lenition</a></li>
<li><a href="http://www.daltai.com/forums/viewthread/707/">More about not leniting Pádraig after féile</a></li>
</ul>temporal anomaly2015-03-16T00:00:00+00:002015-03-16T00:00:00+00:00corcratag:None,2015-03-16:meta/2015-03-16-temporal-anomaly.html<p>I'm gradually migrating old posts over from my <a href="https://jackofalljacks.wordpress.com/">WordPress blog</a>, which will be backdated, ruining the timestamps-through-commits system that could have been, but never was. Hopefully the validity of the alleged timestamps on these posts will never be important for anything.</p>
<p>Comparing the new post<a href="#1">[1]</a> with the old also …</p><p>I'm gradually migrating old posts over from my <a href="https://jackofalljacks.wordpress.com/">WordPress blog</a>, which will be backdated, ruining the timestamps-through-commits system that could have been, but never was. Hopefully the validity of the alleged timestamps on these posts will never be important for anything.</p>
<p>Comparing the new post<a href="#1">[1]</a> with the old also reminds me that Wordpress has competent web designers, words which cannot be applied to me. However, my blog has the advantage of working just as well(badly) without JavaScript, which is part of my decision to design it with <a href="https://www.torproject.org/projects/torbrowser.html.en">Tor Browser</a> in mind.</p>
<hr>
<p><a name="1">[1]</a> At the time of writing this I had just migrated <a href="{static}/2014-09-30-updating-shared-variables-in-theano.md" class="ml">"updating shared variables in theano"</a>.</p>databases all the way down2015-02-12T14:20:00+00:002015-02-12T14:20:00+00:00corcratag:None,2015-02-12:biomed/2015-02-12-databases.html<p>I'm (arguably) a data scientist, so I need data to do science. A problem with data is that it's all over the place, a natural and unsurprising consequence of its many origins. Producing databases seems to be a hobby for bioinformaticians, which also includes <a href="http://metadatabase.org/wiki/Main_Page">databases of databases</a> (<a href="http://nar.oxfordjournals.org/content/40/D1/D1250.long">Bolser et al …</a></p><p>I'm (arguably) a data scientist, so I need data to do science. A problem with data is that it's all over the place, a natural and unsurprising consequence of its many origins. Producing databases seems to be a hobby for bioinformaticians, which also includes <a href="http://metadatabase.org/wiki/Main_Page">databases of databases</a> (<a href="http://nar.oxfordjournals.org/content/40/D1/D1250.long">Bolser et al., 2012</a>), so I think it's fair to say some nontrivial effort is expended in trying to deal with this data problem. Large collaborations are pretty good for creating big datasets (e.g. <a href="http://genome.ucsc.edu/ENCODE/downloads.html">ENCODE</a>, <a href="https://tcga-data.nci.nih.gov/tcga/">TCGA</a>), which can lessen the appearance of scattered data (or at least, heighten the attractiveness of centralised data), but these efforts are less about data curation and more about data generation. One notable effort towards more efficient (genomic) data discovery/sharing is the <a href="http://genomicsandhealth.org/">Global Alliance for Genomics and Health</a>, which is working on defining standards, data formats, APIs, things like that. It's not the only project thinking about APIs and formats (of course). Skimming my notes from the <a href="http://meetings.cshl.edu/meetings/2014/data14.shtml">Biological Data Science</a> meeting at CSHL last year, I see: <a href="http://osdf.igs.umaryland.edu/">Open Science Data Framework</a>, the NIH's <a href="https://biocaddie.org/">bioCADDIE</a>, Ensembl's <a href="http://rest.ensembl.org/">REST API</a>, and so on<a href="#1">[1]</a>. For the sake of efficiency I hope the community can come to some consensus on how best to store/index data and metadata, although a quote from Richard Durbin comes to mind<a href="#2">[2]</a>,</p>
<blockquote>
<p>"In science, always there are lots of people looking at the same thing in different ways. There are people trying out all sorts of crazy things. It's extremely successful to not have top-down control. It can look a little bit redundant when you have a person write yet another read mapper, but sometimes things will be influential. New ideas will come. Sometimes things can be relevant to individual projects. I think for sure things are done inefficiently. I accept that. It's a bit like evolution. Random mutation and testing is very powerful." <a href="http://www.nature.com/nbt/journal/v31/n10/full/nbt.2721.html">The anatomy of successful computational biology software (Nature Biotech, 2013)</a></p>
</blockquote>
<p>Which is to say I'm excessively justifying my decision to create yet another list of resources (but just a list, I have no intention of actually <em>serving</em> any data). In this case it's something I wanted to do for myself anyway, and <em>more importantly</em> I'm starting a new category of non-blog pages on my site (although technically the <a href="https://corcra.github.io/contact/">contact</a> page was first). The idea is to separate pages which I feel are more time-insensitive (like tutorials), or which I intend to keep updated (like my contact details), and treat things on the blog as an unmodifiable record that will likely become outdated. So <a href="https://corcra.github.io/datasets.html"><strong>here</strong></a> is my dataset database. It covers 'things which are relevant to me', which you might find useful, if you're me. It might also be useful for people using convoluted methods to infer my research interests.</p>
<hr>
<p><a name="1">[1]</a> It's reasonably likely these are not equivalent projects. I'm not really familiar with any of them, so YMMV.</p>
<p><a name="2">[2]</a> Duplication of effort is something I think about a lot in the context of bioinformatics/computational biology/computers. This quote makes me feel better about it.</p>into the gui pond2015-02-03T13:37:00+00:002015-02-03T13:37:00+00:00corcratag:None,2015-02-03:sec/2015-02-03-pond-with-gui.html<p>In my <a href="https://corcra.github.io/sec/2015/01/30/pond-on-yosemite.html">previous post</a> about getting <a href="https://pond.imperialviolet.org/">Pond</a> running on Yosemite, I ran into an issue with the GUI. The CLI interface seems to be fully-functional and pleasant enough for me, but GUI-errors are no guid. So yesterday I tried to figure out what the problem was, and somehow fixed it …</p><p>In my <a href="https://corcra.github.io/sec/2015/01/30/pond-on-yosemite.html">previous post</a> about getting <a href="https://pond.imperialviolet.org/">Pond</a> running on Yosemite, I ran into an issue with the GUI. The CLI interface seems to be fully-functional and pleasant enough for me, but GUI-errors are no guid. So yesterday I tried to figure out what the problem was, and somehow fixed it in the process. Naturally I was not keeping detailed logs.</p>
<p>It went something like this.</p>
<h3>gtk3</h3>
<p>First, I made sure I could run something else using GTK, so:</p>
<div class="highlight"><pre><span></span>> gtk3-demo
</pre></div>
<p>This technically ran, but produced a lot of warnings and errors, e.g.</p>
<div class="highlight"><pre><span></span>(gtk3-demo:99098): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme
(gtk3-demo:99098): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
</pre></div>
<p>which is possibly a related problem to the one I had with Pond, but given Pond now works for me, and I still get these errors, I suspect they have different origins/are not directly causally related.</p>
<h3>becoming one with the error</h3>
<p>So I tried to understand the actual error I was getting (from <a href="https://corcra.github.io/assets/pond-panic.txt">this log</a>):</p>
<div class="highlight"><pre><span></span>panic: (*gdkpixbuf._Ctype_struct__GError) (0x4383380,0x5c6be20)
</pre></div>
<p>This involved following the golden braid <a href="https://github.com/agl/pond/blob/master/client/gtk.go">deeper</a> into <a href="https://github.com/agl/go-gtk/blob/master/gdkpixbuf/gdkpixbuf.go">the</a> inner <a href="https://git.gnome.org/browse/gdk-pixbuf/tree/gdk-pixbuf/gdk-pixbuf-loader.c">workings</a> of <code>go</code> <a href="https://git.gnome.org/browse/gdk-pixbuf/tree/gdk-pixbuf/gdk-pixbuf-io.c">and</a> <code>gdk-pixbuf</code>, in the hopes that something would start to make sense.</p>
<p>Clarity was not forthcoming. I got to look at non-scientific code for a while, and I decided <code>gdk-pixbuf</code> was to blame, but otherwise learned little. This isn't terribly surprising given my lack of knowledge of Go/gtk/OSX/etc. I tried. At least I had a witch (<code>gdk-pixbuf</code>) to burn.</p>
<h3>fun with reinstalling everything repeatedly</h3>
<p>I thought about trying to test <code>gdkpixbuf.PixbufLoaderWithType("png")</code> on its own, but I was lazy and foolish, so I just tried reinstalling <code>gdk-pixbuf</code> instead.</p>
<div class="highlight"><pre><span></span>brew install gdk-pixbuf
/usr/local/Cellar/gdk-pixbuf/2.30.8/bin/gdk-pixbuf-query-loaders --update-cache
</pre></div>
<p>I think this is when I introduced a new problem, thought 'damn, OK I'll just fix this problem and get back to carefully recording how I fix this GUI error', and in the process fixed the GUI. Naturally. The problem I introduced looked like this:</p>
<div class="highlight"><pre><span></span><span class="o">></span> <span class="n">client</span>
<span class="n">dyld</span><span class="p">:</span> <span class="n">Library</span> <span class="k">not</span> <span class="n">loaded</span><span class="p">:</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="k">local</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">libgdk_pixbuf</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="n">dylib</span>
<span class="n">Referenced</span> <span class="k">from</span><span class="p">:</span> <span class="p">[</span><span class="err">$</span><span class="n">GOPATH</span><span class="p">]</span><span class="o">/</span><span class="n">bin</span><span class="o">/</span><span class="n">client</span>
<span class="n">Reason</span><span class="p">:</span> <span class="n">Incompatible</span> <span class="n">library</span> <span class="k">version</span><span class="p">:</span> <span class="n">client</span> <span class="n">requires</span> <span class="k">version</span> <span class="mi">3101</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">0</span> <span class="k">or</span> <span class="n">later</span><span class="p">,</span> <span class="n">but</span> <span class="n">libgdk_pixbuf</span><span class="o">-</span><span class="mi">2</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="n">dylib</span> <span class="n">provides</span> <span class="k">version</span> <span class="mi">3001</span><span class="p">.</span><span class="mi">0</span><span class="p">.</span><span class="mi">0</span>
<span class="n">Trace</span><span class="o">/</span><span class="n">BPT</span> <span class="n">trap</span><span class="p">:</span> <span class="mi">5</span>
</pre></div>
<p>Which looks suspiciously like a version got messed up, maybe because I installed <code>gdk-pixbuf</code> individually, maybe because of magic. So I then uninstalled it, reinstalled <code>gtk+3</code> (which pulled <code>gdk-pixbuf</code> down first; error persisted), reinstalled <code>gtkspell3</code>, all to no avail. Then I did a <code>brew cleanup</code> and it deleted some old versions and cached bottles. Determined to somehow update my <code>gdk-pixbuf</code> (naively believing that the newest version of a thing must be the optimal one), I explored:</p>
<div class="highlight"><pre><span></span><span class="o">></span> <span class="n">brew</span> <span class="n">info</span> <span class="n">gdk</span><span class="o">-</span><span class="n">pixbuf</span>
<span class="n">gdk</span><span class="o">-</span><span class="n">pixbuf</span><span class="p">:</span> <span class="k">stable</span> <span class="mi">2</span><span class="p">.</span><span class="mi">30</span><span class="p">.</span><span class="mi">8</span> <span class="p">(</span><span class="n">bottled</span><span class="p">)</span>
<span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">gtk</span><span class="p">.</span><span class="n">org</span>
<span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="k">local</span><span class="o">/</span><span class="n">Cellar</span><span class="o">/</span><span class="n">gdk</span><span class="o">-</span><span class="n">pixbuf</span><span class="o">/</span><span class="mi">2</span><span class="p">.</span><span class="mi">30</span><span class="p">.</span><span class="mi">8</span> <span class="p">(</span><span class="mi">209</span> <span class="n">files</span><span class="p">,</span> <span class="mi">4</span><span class="p">.</span><span class="mi">3</span><span class="n">M</span><span class="p">)</span> <span class="o">*</span>
<span class="n">Poured</span> <span class="k">from</span> <span class="n">bottle</span>
<span class="k">From</span><span class="p">:</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="p">.</span><span class="n">com</span><span class="o">/</span><span class="n">Homebrew</span><span class="o">/</span><span class="n">homebrew</span><span class="o">/</span><span class="nb">blob</span><span class="o">/</span><span class="n">master</span><span class="o">/</span><span class="n">Library</span><span class="o">/</span><span class="n">Formula</span><span class="o">/</span><span class="n">gdk</span><span class="o">-</span><span class="n">pixbuf</span><span class="p">.</span><span class="n">rb</span>
<span class="o">==></span> <span class="n">Dependencies</span>
<span class="n">Build</span><span class="p">:</span> <span class="n">xz</span> <span class="err">✘</span><span class="p">,</span> <span class="n">pkg</span><span class="o">-</span><span class="n">config</span> <span class="err">✔</span>
<span class="n">Required</span><span class="p">:</span> <span class="n">glib</span> <span class="err">✔</span><span class="p">,</span> <span class="n">jpeg</span> <span class="err">✔</span><span class="p">,</span> <span class="n">libtiff</span> <span class="err">✔</span><span class="p">,</span> <span class="n">libpng</span> <span class="err">✔</span><span class="p">,</span> <span class="n">gobject</span><span class="o">-</span><span class="n">introspection</span> <span class="err">✔</span>
<span class="o">==></span> <span class="k">Options</span>
<span class="c1">--universal</span>
<span class="n">Build</span> <span class="n">a</span> <span class="n">universal</span> <span class="nb">binary</span>
<span class="o">==></span> <span class="n">Caveats</span>
<span class="n">Programs</span> <span class="n">that</span> <span class="n">require</span> <span class="n">this</span> <span class="n">module</span> <span class="n">need</span> <span class="k">to</span> <span class="k">set</span> <span class="n">the</span> <span class="n">environment</span> <span class="k">variable</span>
<span class="n">export</span> <span class="n">GDK_PIXBUF_MODULEDIR</span><span class="o">=</span><span class="ss">"/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders"</span>
<span class="k">If</span> <span class="n">you</span> <span class="n">need</span> <span class="k">to</span> <span class="n">manually</span> <span class="k">update</span> <span class="n">the</span> <span class="n">query</span> <span class="n">loader</span> <span class="k">cache</span><span class="p">,</span> <span class="k">set</span> <span class="n">GDK_PIXBUF_MODULEDIR</span> <span class="k">then</span> <span class="n">run</span>
<span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="k">local</span><span class="o">/</span><span class="n">Cellar</span><span class="o">/</span><span class="n">gdk</span><span class="o">-</span><span class="n">pixbuf</span><span class="o">/</span><span class="mi">2</span><span class="p">.</span><span class="mi">30</span><span class="p">.</span><span class="mi">8</span><span class="o">/</span><span class="n">bin</span><span class="o">/</span><span class="n">gdk</span><span class="o">-</span><span class="n">pixbuf</span><span class="o">-</span><span class="n">query</span><span class="o">-</span><span class="n">loaders</span> <span class="c1">--update-cache</span>
</pre></div>
<h3>maximum <code>gdk-pixbuf</code> installation</h3>
<p>I don't feel proud of this, but I liked the sound of a 'universal binary' so I went for that.</p>
<div class="highlight"><pre><span></span><span class="o">></span> <span class="n">brew</span> <span class="n">reinstall</span> <span class="c1">--universal gdk-pixbuf</span>
<span class="o">==></span> <span class="n">Installing</span> <span class="n">dependencies</span> <span class="k">for</span> <span class="n">gdk</span><span class="o">-</span><span class="n">pixbuf</span><span class="p">:</span> <span class="n">sqlite</span><span class="p">,</span> <span class="n">gdbm</span><span class="p">,</span> <span class="n">makedepend</span><span class="p">,</span> <span class="n">openssl</span><span class="p">,</span> <span class="n">python</span><span class="p">,</span> <span class="n">xz</span><span class="p">,</span> <span class="n">gettext</span><span class="p">,</span> <span class="n">glib</span><span class="p">,</span> <span class="n">jpeg</span><span class="p">,</span> <span class="n">libtiff</span><span class="p">,</span> <span class="n">libpng</span><span class="p">,</span> <span class="n">gobject</span><span class="o">-</span><span class="n">intros</span>
</pre></div>
<p>. . . But then it was taking too long, so I cancelled it during <code>gettext</code>. <em>I'm so, so sorry.</em></p>
<p>The next event I have recorded in my logs was me <em>uninstalling</em> <code>gdk-pixbuf</code> and <code>gtk+3</code>, then reinstalling <code>gtk+3</code>. All for good measure. I then tried to cleanly reinstall pond, so</p>
<div class="highlight"><pre><span></span>> <span class="nb">cd</span> <span class="nv">$GOPATH</span>
> rm -r *
> go get github.com/agl/pond/client
</pre></div>
<p>. . . and . . </p>
<div class="highlight"><pre><span></span>> client
Feb <span class="m">1</span> <span class="m">02</span>:03:50: Starting fetch from home server
</pre></div>
<p>It Just Worked.</p>
<p>I was hoping the <code>dylib</code> problem would go away and I could return to my GUI issues, but nope. All fixed. I tried uninstalling things (<code>gtk+3</code>, <code>go</code>, <code>gtkspell3</code>, <code>mercurial</code>, <code>gdk-pixbuf</code>, <code>pond</code>) in an attempt to recreate the original (or subsequent) issue(s), but it refused to be broken. I have a list of all the dependencies I installed during this fiasco, so I could <em>in theory</em> spend more time trying to break it again, or I could not.</p>
<p><a href="http://beesandbombs.tumblr.com/post/106618422479/funnel">at the end of the magical vortex, a thousand bald yaks</a><br>
<a href="http://beesandbombs.tumblr.com/post/106618422479/funnel"><img src="http://38.media.tumblr.com/2671206c90dbe899d8bcd2116cbd7cb4/tumblr_nhem70bBYT1r2geqjo1_500.gif" style="width: 40vw;"></a></p>
<p>Incidentally, after all of this, it transpires that that One Weird Trick:</p>
<div class="highlight"><pre><span></span>> gdk-pixbuf-query-loaders > <span class="nv">$GOPATH</span>/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
</pre></div>
<p>is no longer required for <code>client</code> to run. So that's fewer files and more GUIs, what could be better?</p>setting up pond on yosemite2015-01-30T00:00:00+00:002015-01-30T00:00:00+00:00corcratag:None,2015-01-30:sec/2015-01-30-pond-on-yosemite.html<p>This is about <a href="https://pond.imperialviolet.org/">Pond</a>. If you have no idea what that is but don't want to click on the link, I shall quote directly;</p>
<p><em>Pond is not email. Pond is forward secure, asynchronous messaging for the discerning. Pond messages are asynchronous, but are not a record; they expire automatically a …</em></p><p>This is about <a href="https://pond.imperialviolet.org/">Pond</a>. If you have no idea what that is but don't want to click on the link, I shall quote directly;</p>
<p><em>Pond is not email. Pond is forward secure, asynchronous messaging for the discerning. Pond messages are asynchronous, but are not a record; they expire automatically a week after they are received. Pond seeks to prevent leaking traffic information against everyone except a global passive attacker.</em></p>
<p>If that seems interesting, go back and click on the link. Otherwise get out while you still can.</p>
<p>My goal here is to get Pond running. I unfortunately don't have any Pond secrets to hand right now, so testing its messaging functionality will have to come later. The instructions on the main Pond page for OSX are fairly good, so this is just a slight elaboration/modification on those. This is going to look longer than it should because I haven't solved formatting code snippets on this blog yet.</p>
<h2>System</h2>
<p>I'm using a ~2012 Macbook Pro 13inch Retina blah blah, running OSX Yosemite (version 10.10.1). It's a fairly recent install, so I haven't had time to ruin everything yet. That said, I have <a href="https://www.torproject.org/projects/torbrowser.html.en">Tor Browser</a> installed and running. Obviously.</p>
<h2>tl;dr</h2>
<p>GUI is b0rked, CLI seems to work. From <a href="https://pond.imperialviolet.org/">the site</a>, for a CLI-version:</p>
<div class="highlight"><pre><span></span>> brew install go
> <span class="nb">export</span> <span class="nv">GOPATH</span><span class="o">=</span><span class="nv">$HOME</span>/gopkg
> <span class="nb">export</span> <span class="nv">PATH</span><span class="o">=</span><span class="nv">$PATH</span>:<span class="nv">$GOPATH</span>/bin
> go get -tags nogui github.com/agl/pond/client
> <span class="nb">alias</span> <span class="nv">pond</span><span class="o">=</span><span class="s2">"</span><span class="nv">$GOPATH</span><span class="s2">/bin/client"</span>
</pre></div>
<p>But now for <em>how I spent my Friday evening:</em></p>
<h2>Dependencies</h2>
<h3>Go</h3>
<div class="highlight"><pre><span></span>> brew install go
</pre></div>
<p>Painless success, version: go1.4.1 darwin/amd64. Then make a folder for <a href="http://golang.org/doc/code.html#GOPATH">Go packages</a>,</p>
<div class="highlight"><pre><span></span>> mkdir <span class="nv">$HOME</span>/gopkg
</pre></div>
<p>Export some environment variables to keep Go happy, (I also added these to my .bash_profile)</p>
<div class="highlight"><pre><span></span>> <span class="nb">export</span> <span class="nv">GOPATH</span><span class="o">=</span><span class="nv">$HOME</span>/gopkg
> <span class="nb">export</span> <span class="nv">PATH</span><span class="o">=</span><span class="nv">$PATH</span>:<span class="nv">$GOPATH</span>/bin
</pre></div>
<p>One more for good measure,</p>
<div class="highlight"><pre><span></span>> <span class="nb">export</span> <span class="nv">PKG_CONFIG_PATH</span><span class="o">=</span>/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:<span class="nv">$PKG_CONFIG_PATH</span>
</pre></div>
<h3>gtk+3</h3>
<p><em>(These other dependencies are probably a bit pointless until I figure out how to get the GUI to reliably work, but for the sake of completeness they are here.)</em></p>
<div class="highlight"><pre><span></span>> brew install gtk+3
</pre></div>
<p>It complains that it needs XQuartz 2.5, so that is resolved (as it suggests) with</p>
<div class="highlight"><pre><span></span>> brew install Caskroom/cask/xquartz
</pre></div>
<h3>gtkspell3</h3>
<div class="highlight"><pre><span></span>> brew install gtkspell3
</pre></div>
<p>This installed a whole pile of dependencies (including, concerningly, Python: the number of Pythons I have installed grows by the day), and my laptop crashed shortly after they finished, but I think that was random.</p>
<h3>mercurial</h3>
<div class="highlight"><pre><span></span>> brew install mercurial
</pre></div>
<h2>Pond</h2>
<div class="highlight"><pre><span></span>> go get github.com/agl/pond/client
</pre></div>
<p>It produces lots of warnings, but seemingly no errors. And who reads warnings? Since it's already in my path (see above), running it is simply (I think this could do with being more descriptive):</p>
<div class="highlight"><pre><span></span>> client
</pre></div>
<p>Disaster strikes.</p>
<div class="highlight"><pre><span></span>>Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
</pre></div>
<p>and</p>
<div class="highlight"><pre><span></span>><span class="o">(</span><unknown>:917<span class="o">)</span>: GdkPixbuf-WARNING **: Cannot open pixbuf loader module file <span class="s1">'[$GOPATH]/bin/../lib/gdk-pixbuf-2.0/2.10.0/loaders.cache'</span>: No such file or directory
>This likely means that your installation is broken.
>Try running the <span class="nb">command</span> gdk-pixbuf-query-loaders > <span class="o">[</span><span class="nv">$GOPATH</span><span class="o">]</span>/bin/../lib/gdk-pixbuf-2.0/2.10.0/loaders.cache to make things work again <span class="k">for</span> the <span class="nb">time</span> being.
</pre></div>
<p>(I'm using rectangular brackets to denote that I manually replaced its output with the logical meaning, so you don't have to look at my home directory path :)</p>
<h3>dbus</h3>
<p>First problem is where in the hell is <code>org.freedesktop.dbus-session.plist</code>?</p>
<p>(it's not in in /Library/LaunchAgents or /Library/LaunchDaemons, or ~/Library/LaunchAgents)</p>
<p>The answer, if you <code>brew reinstall dbus</code> to find out (or use some other kind of sorcery) is:</p>
<p>To have launchd start d-bus at login:</p>
<div class="highlight"><pre><span></span>ln -sfv /usr/local/opt/d-bus/*.plist ~/Library/LaunchAgents
</pre></div>
<p>That's where it is.</p>
<p>Then to load d-bus now:</p>
<div class="highlight"><pre><span></span>launchctl load ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist
</pre></div>
<h3>pixbuf</h3>
<p>So the folder it's expecting (<code>lib/gdk-pixbuf...</code>) is certainly not found at <code>[$GOPATH]/bin/...</code>, since that's just <code>$GOPATH</code>.</p>
<p>By running <code>gdk-pixbuf-query-loaders</code> I can see it's probably expecting this path or something:</p>
<div class="highlight"><pre><span></span>/usr/local/Cellar/gdk-pixbuf/2.31.2/lib/gdk-pixbuf-2.0/2.10.0/loaders/
</pre></div>
<p>Which would only be appropriate if <code>$GOPATH=/usr/local/Cellar/gdk-pixbuf/2.31.2/</code>, which it is not by construction. I can get around this as it suggests by creating a bunch of empty folders and then running</p>
<div class="highlight"><pre><span></span>> gdk-pixbuf-query-loaders > <span class="nv">$GOPATH</span>/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
</pre></div>
<p>Which gets rid of the warnings. Now when I run</p>
<div class="highlight"><pre><span></span>> client
</pre></div>
<p>I get no (immediate) errors! Success! Maybe!</p>
<h2>GUI-sadness</h2>
<p>Empowered by the graphics, I set a password and create an account on the default server.</p>
<p>. . . and it <em>panics</em>. That is to say, the GUI vanishes (although X11 is still running) and I get a <a href="https://corcra.github.io/assets/pond-panic.txt">lot of errors</a>. Not only that, but now if I try to run it again,</p>
<div class="highlight"><pre><span></span>> client
Jan <span class="m">30</span> <span class="m">23</span>:46:58: Fatal error: state file is too small to be valid
</pre></div>
<p>Shit.</p>
<p>Maybe I just need the gentle embrace of the command line?</p>
<div class="highlight"><pre><span></span>> client -cli<span class="o">=</span><span class="nb">true</span>
>>> Pond...
>>> >>> state file is too small to be valid
</pre></div>
<p>Abort, abort!</p>
<div class="highlight"><pre><span></span>> rm <span class="nv">$HOME</span>/.pond
> client -cli<span class="o">=</span><span class="nb">true</span>
</pre></div>
<p>And now, everything is beautiful and nothing hurts.</p>
<p><img src="https://corcra.github.io/assets/pond_screenshot.png" style="width: 40vw; border:5px solid #000000;"/></p>first post2015-01-26T00:00:00+00:002015-01-26T00:00:00+00:00corcratag:None,2015-01-26:meta/2015-01-26-first-post.html<p>Does anyone remember their first website? I know I was a nine-year-old with Microsoft Word and "Save as HTML", which seems like a decent reason to forget it, even if it was Pokemon-themed. Given my complete lack of gainful employment at the time, I took to website-making as if it …</p><p>Does anyone remember their first website? I know I was a nine-year-old with Microsoft Word and "Save as HTML", which seems like a decent reason to forget it, even if it was Pokemon-themed. Given my complete lack of gainful employment at the time, I took to website-making as if it were important, as if its utility would not soon be eclipsed by the simplicity afforded by services like Livejournal and Bebo<a href="#1">[1]</a>. I spent many hours refining and redefining my vision, a vision comprised mostly of iframes.</p>
<p>Here comes one now:
<a href="http://media.ccc.de/browse/congress/2014/31c3_-_6373_-_en_-_saal_6_-_201412291600_-_the_only_thing_we_know_about_cyberspace_is_that_its_640x480_-_olia_lialina.html">The Only Thing We Know About Cyberspace Is That Its 640x480 (Olia Lialina @31C3)</a></p>
<iframe width="670" height="380" src="http://media.ccc.de/browse/congress/2014/31c3_-_6373_-_en_-_saal_6_-_201412291600_-_the_only_thing_we_know_about_cyberspace_is_that_its_640x480_-_olia_lialina/oembed.html" frameborder="0" allowfullscreen></iframe>
<p>This talk is largely about the GeoCities era of personal websites, which was already on the way out when I was getting started, but things were different in Ireland anyway. We had 'Ireland On-Line', which is now a five-line <a href="https://en.wikipedia.org/wiki/Ireland_On-Line">Wikipedia article</a>, a legacy webmail service and a mausoleum of personal pages and auto-redirects.</p>
<p>Selected snippets:</p>
<p><i>optimised for Netscape 4.70</i> <a href="http://www.iol.ie/~taeger/">[source]</a></p>
<p><img src='http://www.iol.ie/~gscoil/images/netgaeilge.gif'></p>
<p><i>What's cool: Gameboy, playstation, me, Doom.</i> <a href="http://www.iol.ie/~gscoil/darlingtons/zac/index.htm">[source]</a></p>
<p><i>While as yet, SnoopDos exists only on the Amiga, I'm happy to report that similar utilities have sprung up for DOS, Windows 3.1, Windows 95, and Windows NT. </i> <a href="http://www.iol.ie/~ecarroll/snoopdos.html">[source]</a></p>
<p><i>Divorce, in the Church's view, threatens to deconstruct the primary unit upon which the model for the Church is built. The battle for the retention of the form of the traditional family becomes the battle for the retention of a particular model of church organisation. This is why the debate is so fiercely fought.</i><a href="#2">[2]</a> <a href="http://www.iol.ie/~mazzoldi/toolsforchange/zine/sam94/divorce.html">[source]</a></p>
<p><i>"'Yo motherfucker,' Marx greeted. Proudhon was at a loss."</i> <a href="http://www.iol.ie/~mazzoldi/toolsforchange/marx/marx7.html">[source]</a> (somehow related to previous one)</p>
<p><i>The genesis of a new British police force can be seen in Mowlam's proposal to introduce the subtitle 'Northern Ireland Police Service' (NIPS) to the RUC.</i><a href="#3">[3]</a> <a href="iol.ie/~saoirse/iris/1997/225.htm">[source]</a></p>
<p>Cutting that unexpectedly-engrossing tangent short, I'll clarify that this site is not a nostalgia trip. I will be keeping the animated gifs to a minimum (unless they come from <a href="http://beesandbombs.tumblr.com/">David Whyte</a>) and attempting to adhere to sane design principles. The talk I linked planted a seed of sorts in me, though. I can't argue that it caused this site, because it's been in the works for a while, but it catalysed me. </p>
<p>The seed is roughly this: In a time when one's internet presence was a deliberate act rather than a social necessity, making a website and appearing on cyberspace<a href="#4">[4]</a> was preceded by a question of surprisingly existential nature: </p>
<p><i>"What will I make my website about? What do I have to say?"</i></p>
<p>I believe that one's web presence today has similar associated questions (notably "what image do I wish to portray?"), but thanks to the existence of a set of well-established social norms, a person can largely ignore them. It is entirely possible to exist online without asking any existentalist questions. This is arguably great, because the internet is fantastic and should not be restricted to a set of people who find it necessary to frame their actions as manifestations of the struggle for self-definition, and/or people who know HTML.</p>
<p>I think I fall somewhere in the 'and' category.</p>
<p>So I'm making a website for a few reasons, which are secretly the same reason<a href="#5">[5]</a>. I like thinking about what I have to say. I think questions of that nature are interesting and can be quite personally fulfilling, even if the answer turns out to be 'mostly nothing'. I also like thinking about how to say things, which is part of the reason this entry has taken me far too long to finish<a href="#6">[6]</a>.</p>
<p>There is also the careful deliberateness which goes into creating a website like this. My CSS was completely nonexistent when I started this a few weeks ago. I'd recommend against reading the source code if you are sensitive about CSS, because terrible, likely-forbidden things have happened and I am remorseless. Things will only get worse as I enact my weird design plans on other parts of the site<a href="#7">[7]</a>. I cannot wait.</p>
<p>So yeah, I could run a blog on an existing service, but where would be the fun in that?</p>
<hr>
<p><a name="1">[1]</a> Bebo became extremely popular in Ireland when I was about 15, and suddenly using the internet became socially acceptable.</p>
<p><a name="2">[2]</a> I think this is particularly interesting, because Ireland finds itself (a mere 20 years later) on the precipice of another historic referendum (this time to legalise gay marriage), but the church makes the same old arguments. Society marches ever onwards, and the church is immobile.</p>
<p><a name="3">[3]</a> They went with PSNI in the end, presumably in deference to <a href="http://nips.cc/">NIPS</a>.</p>
<p><a name="4">[4]</a> Before it became infested with cybercriminals and c y b e r w a r f a r e.</p>
<p><a name="5">[5]</a> Proof left as exercise to the reader.</p>
<p><a name="6">[6]</a> Also fighting a losing battle against pre-ironic post-irony creeping into my tone.</p>
<p><a name="7">[7]</a> I intend to keep the blog as minimalist as is palatable.</p>updating shared variables in theano2014-09-30T00:00:00+01:002014-09-30T00:00:00+01:00corcratag:None,2014-09-30:ml/2014-09-30-updating-shared-variables-in-theano.html<p>Background: I am running python with <a href="http://deeplearning.net/software/theano/index.html">Theano</a> on a GPU, and I care about speed.</p>
<p>Scenario: I have a largeish matrix (<code>C</code>) which is stored as a shared variable, and I need to update a subset of the rows (<code>modified_rows</code>) by some other matrix (<code>C_delta</code>). What should I do?</p>
<p>Initialising …</p><p>Background: I am running python with <a href="http://deeplearning.net/software/theano/index.html">Theano</a> on a GPU, and I care about speed.</p>
<p>Scenario: I have a largeish matrix (<code>C</code>) which is stored as a shared variable, and I need to update a subset of the rows (<code>modified_rows</code>) by some other matrix (<code>C_delta</code>). What should I do?</p>
<p>Initialising, e.g.:</p>
<div class="highlight"><pre><span></span> <span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">theano</span> <span class="kn">import</span> <span class="n">function</span><span class="p">,</span> <span class="n">shared</span>
<span class="kn">from</span> <span class="nn">theano.tensor</span> <span class="kn">import</span> <span class="n">fmatrix</span><span class="p">,</span> <span class="n">ivector</span><span class="p">,</span> <span class="n">set_subtensor</span>
<span class="n">C</span> <span class="o">=</span> <span class="n">shared</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">normal</span><span class="p">(</span><span class="kp">size</span><span class="o">=</span><span class="p">(</span><span class="mi">70000</span><span class="p">,</span> <span class="mi">100</span><span class="p">)))</span>
<span class="n">modified_rows</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="kp">randint</span><span class="p">(</span><span class="n">low</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">high</span><span class="o">=</span><span class="mi">70000</span><span class="p">,</span> <span class="kp">size</span><span class="o">=</span><span class="mi">200</span><span class="p">)</span>
<span class="n">C_delta</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">normal</span><span class="p">(</span><span class="kp">size</span><span class="o">=</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">modified_rows</span><span class="p">),</span> <span class="mi">100</span><span class="p">))</span>
<span class="n">C_d</span> <span class="o">=</span> <span class="n">fmatrix</span><span class="p">(</span><span class="s1">'C_delta'</span><span class="p">)</span>
<span class="n">mod_rows</span> <span class="o">=</span><span class="n">ivector</span><span class="p">(</span><span class="s1">'modified_rows'</span><span class="p">)</span>
</pre></div>
<p>Slow method: manually reset the values:</p>
<div class="highlight"><pre><span></span><span class="err"> C_temp = C.get_value()</span>
<span class="err"> C_temp[modified_rows, :] = C_temp[modified_rows, :] + C_delta</span>
<span class="err"> C.set_value(C_temp)</span>
</pre></div>
<p>Speed:</p>
<div class="highlight"><pre><span></span><span class="err"> 32 function calls in 0.055 seconds</span>
<span class="err"> ncalls tottime percall cumtime percall filename:lineno(function)</span>
<span class="err"> ...</span>
<span class="err"> 1 0.000 0.000 0.026 0.026 sharedvalue.py:100(set_value)</span>
<span class="err"> 1 0.000 0.000 0.027 0.027 sharedvalue.py:80(get_value)</span>
</pre></div>
<p>This is bad because it requires unpacking and repacking the value in the shared variable (via <code>get_value</code> and <code>set_value</code>). We only need to modify a small number of the rows (200 out of 70k) so having to update every single one seems extremely wasteful.</p>
<p>Part of the 'nice thing' about shared variables is that they can be updated by functions which use them, so you might try:</p>
<div class="highlight"><pre><span></span><span class="err"> update_C = function([C_d, mod_rows], [],</span>
<span class="err"> updates=[(C[mod_rows, :], C[mod_rows, :] + C_d)], </span>
<span class="err"> allow_input_downcast=True)</span>
</pre></div>
<p>(remember, <code>C_d</code> and <code>mod_rows</code> are <em>symbolic variables</em> (specifically <code>fmatrix</code> and ivector) defined above).
The <code>allow_input_downcast=True</code> will deal with numpy's love of dealing in double-precision floats, which Theano rejects for GPU work. This loss of precision <em>may</em> be important to you.</p>
<p>So then a simple call to <code>update_C(C_delta, modified_rows)</code> will do what you want, except that what I just wrote won't work. You can't update shared variables like that. I think it's because the first element of the tuple is not <em>really</em> the shared variable, so Theano freaks out. (Full disclosure: little idea of theano's inner workings.)</p>
<p>Focusing solely on the <code>updates=[...]</code> part (everything else should be OK), you need to do:</p>
<div class="highlight"><pre><span></span><span class="w"> </span><span class="n">updates</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">[</span><span class="n">(C, set_subtensor(C[modified_rows</span><span class="o">]</span><span class="p">,</span><span class="w"> </span><span class="n">C_delta</span><span class="p">))</span><span class="err">]</span><span class="w"></span>
</pre></div>
<p>So the full command (if you are lazily copying and pasting this into iPython to test speed):</p>
<div class="highlight"><pre><span></span><span class="err"> update_C = function([C_d, mod_rows], [], </span>
<span class="err"> updates=[(C, set_subtensor(C[mod_rows, :] + C_d))], </span>
<span class="err"> allow_input_downcast=True)</span>
</pre></div>
<p>Things which won't work (for reasons unknown to me):</p>
<div class="highlight"><pre><span></span><span class="w"> </span><span class="n">C</span><span class="o">[</span><span class="n">modified_rows</span><span class="o">]</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">C</span><span class="o">[</span><span class="n">modified_rows, :</span><span class="o">]</span><span class="w"></span>
<span class="w"> </span><span class="n">C_delta</span><span class="w"> </span><span class="o">-></span><span class="w"> </span><span class="n">C_delta</span><span class="o">[</span><span class="n">:, :</span><span class="o">]</span><span class="w"></span>
</pre></div>
<p>As for the speed for this method: well,</p>
<div class="highlight"><pre><span></span><span class="err"> 28 function calls in 0.001 seconds</span>
<span class="err"> ncalls tottime percall cumtime percall filename:lineno(function)</span>
<span class="err"> ...</span>
<span class="err"> 1 0.001 0.001 0.001 0.001 subtensor.py:1644(perform)</span>
</pre></div>
<p>I think that solves the problem.</p>
<p>Related:<br>
<a href="https://stackoverflow.com/questions/24229361/theano-indexing-inside-a-compiled-function-gpu">https://stackoverflow.com/questions/24229361/theano-indexing-inside-a-compiled-function-gpu</a> <br>
<a href="https://stackoverflow.com/questions/15917849/how-can-i-assign-update-subset-of-tensor-shared-variable-in-theano">https://stackoverflow.com/questions/15917849/how-can-i-assign-update-subset-of-tensor-shared-variable-in-theano</a></p>
<p>Possibly relevant technical information:<br>
<em>Theano version is 0.6.0.<br>
Numpy version is 1.8.2, using Intel's Math Kernel Library (MKL) as part of Anaconda.<br>
GPU is a GeForce GTX 680.</em></p>
<p><strong>Note:</strong> this post first appeared on my <a href="https://jackofalljacks.wordpress.com/">wordpress blog.</a></p>deletion and replacement of strings in bash2013-12-24T00:00:00+00:002013-12-24T00:00:00+00:00corcratag:None,2013-12-24:tips/2013-12-24-strings-in-bash.html<p>I try to record useful one-liners for future reference. I forgot to write down what this one does:</p>
<div class="highlight"><pre><span></span> mv <span class="nv">$f</span> <span class="cp">${</span><span class="n">f</span><span class="c1">##START</span><span class="cp">}</span>.<span class="cp">${</span><span class="n">f</span><span class="o">%%</span><span class="err">$</span><span class="p">{</span><span class="n">f</span><span class="c1">##START</span><span class="cp">}</span>}
</pre></div>
<p>This awkwardly-timed (time-zone troubles) blog post is atonement for my carelessness. Like all one-liners it looks complicated but is pretty simple. It does this:</p>
<div class="highlight"><pre><span></span> > f …</pre></div><p>I try to record useful one-liners for future reference. I forgot to write down what this one does:</p>
<div class="highlight"><pre><span></span> mv <span class="nv">$f</span> <span class="cp">${</span><span class="n">f</span><span class="c1">##START</span><span class="cp">}</span>.<span class="cp">${</span><span class="n">f</span><span class="o">%%</span><span class="err">$</span><span class="p">{</span><span class="n">f</span><span class="c1">##START</span><span class="cp">}</span>}
</pre></div>
<p>This awkwardly-timed (time-zone troubles) blog post is atonement for my carelessness. Like all one-liners it looks complicated but is pretty simple. It does this:</p>
<div class="highlight"><pre><span></span> > f=STARTonetwothree
> echo <span class="cp">${</span><span class="n">f</span><span class="c1">##START</span><span class="cp">}</span>.<span class="cp">${</span><span class="n">f</span><span class="o">%%</span><span class="err">$</span><span class="p">{</span><span class="n">f</span><span class="c1">##START</span><span class="cp">}</span>}
onetwothree.START
</pre></div>
<p>The <code>${...}</code> construction is brace expansion, which allows us to generate strings. In stages we have</p>
<div class="highlight"><pre><span></span> <span class="cp">${</span><span class="n">f</span><span class="c1">##START</span><span class="cp">}</span>
</pre></div>
<p>This takes the string <code>f</code> and deletes the substring <code>START</code> from the beginning. In fact, it deletes the longest match to the substring, which makes sense when you allow your substring to be something interesting including wildcards (which may have numerous matches). A single <code>#</code> would delete the shortest match: try</p>
<div class="highlight"><pre><span></span> > echo <span class="cp">${</span><span class="n">f</span><span class="c1">#S*T</span><span class="cp">}</span>
ARTonetwothree
> echo <span class="cp">${</span><span class="n">f</span><span class="c1">##S*T</span><span class="cp">}</span>
onetwothree
</pre></div>
<p>To delete the substring from the end of the string, we would use <code>%%</code> or <code>%</code>, where once again two means longest and one means shortest.</p>
<p>So my horrible code fragment creates <code>f'</code> by removing <code>START</code> from the start of <code>f</code>, then creates <code>f''</code> by removing <code>f'</code> from the end of<code>f</code>, combines these with a period in the middle and renames the file named <code>f</code> with this new string-aberration. An easier way to achieve the same result would have been</p>
<div class="highlight"><pre><span></span> mv <span class="nv">$f</span> <span class="cp">${</span><span class="n">f</span><span class="c1">##START</span><span class="cp">}</span>.START
</pre></div>
<p>but this does not generalise to the case of an arbitrary substring.</p>
<p>The obvious application of this is removing/modifying file extensions. To rename all <code>.tgz</code> files as <code>.tar.gz</code>, for example:</p>
<div class="highlight"><pre><span></span> for f in *.tgz do mv <span class="nv">$f</span> <span class="cp">${</span><span class="n">f</span><span class="o">%%</span><span class="n">tgz</span><span class="cp">}</span>tar.gz done
</pre></div>
<p>If the offending substring is not at the beginning or end, you could use replacement:</p>
<div class="highlight"><pre><span></span> > f=all_workERROR_and_ERRORno_playERROR
> echo <span class="cp">${</span><span class="n">f</span><span class="o">//</span><span class="n">ERROR</span><span class="o">/</span><span class="cp">}</span>
all_work_and_no_play
</pre></div>
<p>The syntax is <code>${string/substring/newsubstring}</code>, where a double first slash (as in previous example) replaces all instances of substring. We can also do partial matching</p>
<div class="highlight"><pre><span></span> > echo <span class="cp">${</span><span class="n">f</span><span class="o">/</span><span class="n">E</span><span class="o">*</span><span class="n">R</span><span class="o">/</span><span class="cp">}</span>
all_work
</pre></div>
<p>and of course replacement with something other than an empty string:</p>
<div class="highlight"><pre><span></span> > fp=<span class="cp">${</span><span class="n">f</span><span class="o">/</span><span class="n">E</span><span class="o">*</span><span class="n">R</span><span class="o">/</span><span class="n">_and_all_play</span><span class="cp">}</span>
> echo <span class="cp">${</span><span class="n">fp</span><span class="o">/</span><span class="nb">all</span><span class="o">/</span><span class="n">no</span><span class="cp">}</span>
no_work_and_all_play
</pre></div>
<p>So if you have a bunch of messy gzipped files like</p>
<div class="highlight"><pre><span></span><span class="err"> data.gz.modified.gz.why.gz.did.gz.i.do.this.gz</span>
</pre></div>
<p>the solution is</p>
<div class="highlight"><pre><span></span> for f in *.gz do mv <span class="nv">$f</span> <span class="cp">${</span><span class="n">f</span><span class="o">//.</span><span class="n">gz</span><span class="o">/</span><span class="cp">}</span>.gz done
</pre></div>
<p>and to wonder how you got into that mess in the first place.</p>putting a line in a filename (with sed)2013-08-06T00:00:00+01:002013-08-06T00:00:00+01:00corcratag:None,2013-08-06:tips/2013-08-06-putting-a-line-sed.html<p><em>"How can I cut a line from a file and paste the rest into a file whose title is the line I just cut?"</em></p>
<p>If you find yourself asking yourself this question with any degree of regularity, you may have issues. Luckily for you, the help you so desperately need …</p><p><em>"How can I cut a line from a file and paste the rest into a file whose title is the line I just cut?"</em></p>
<p>If you find yourself asking yourself this question with any degree of regularity, you may have issues. Luckily for you, the help you so desperately need is at hand. It is not the help you want, but it is the help you deserve. For added complication let's assume you want to do this for every line in the file.</p>
<p>Solution (bash):</p>
<div class="highlight"><pre><span></span><span class="err"> > for i in $(seq `wc -l < FILENAME`)</span>
<span class="err"> > do</span>
<span class="err"> > sed ''$i'd' FILENAME > something_else_maybe-`sed -n ''$i'p' FILENAME`</span>
<span class="err"> > done</span>
</pre></div>
<p>What is going on here is the following:</p>
<ul>
<li><code>seq N</code> prints a sequence of integers, 1 to N.</li>
<li><code>wc -l < FILENAME</code> produces the number of lines in <code>FILENAME</code>. The normal way I do this is <code>wc -l FILENAME</code>, but that also prints the name of the file, which would confuse <code>seq</code>.</li>
<li>Enclosing a bash command in ` ` (note these are not ' or ", these are backticks (also known as grave accents (bracket nesting))) replaces the command string with the output of the command. <code>$()</code> also does this. Why are there two ways to do this, and why did I use both of them in my solution? We may never know.</li>
<li><code>sed 'Md' FILENAME</code>, as per the rules of <code>sed</code>, has <code>FILENAME</code> as output, having deleted line <code>M</code> (in our case, <code>'$i'</code>).</li>
<li><code>sed -n 'Qp' FILENAME</code> runs through <code>FILENAME</code>, printing nothing (the <code>-n</code>) flag unless otherwise instructed (with <code>p</code>), as occurs for line <code>Q</code>.</li>
<li>The <code>"something_else_maybe"</code> just demonstrates that you could include other elements in the output filename. Further complication could be introduced here (say replacing it with <code>$i</code> or whatever you want), but that is too far. Too damn far.</li>
</ul>learning hangul(한글)2013-08-02T00:00:00+01:002013-08-02T00:00:00+01:00corcratag:None,2013-08-02:lang/2013-08-02-learning-hangul.html<p><a title="By Illegitimate Barrister (Own work) [CC0, Public domain, Public domain, Public domain, Public domain or Public domain], via Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File%3AHang-Cool_1.png"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/4/41/Hang-Cool_1.png/512px-Hang-Cool_1.png" alt="Hang-Cool 1" width="512" /></a></p>
<p>The Korean alphabet (Hangul) is - so far - my favourite writing system. It is logical and efficient. It pleases my sense of style. Since starting this post over a month ago I took up learning Mandarin so my feelings towards Hanzi are liable to threaten Hangul's dominance in the future, but …</p><p><a title="By Illegitimate Barrister (Own work) [CC0, Public domain, Public domain, Public domain, Public domain or Public domain], via Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File%3AHang-Cool_1.png"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/4/41/Hang-Cool_1.png/512px-Hang-Cool_1.png" alt="Hang-Cool 1" width="512" /></a></p>
<p>The Korean alphabet (Hangul) is - so far - my favourite writing system. It is logical and efficient. It pleases my sense of style. Since starting this post over a month ago I took up learning Mandarin so my feelings towards Hanzi are liable to threaten Hangul's dominance in the future, but for now I side with space-robot alphabet. Because that's what Hangul is.</p>
<p><img src="images/nuclearlaunch.png" alt="See? Space Robots" class="center"></p>
<p>At first glance one may assume that Hangul consists of logograms - characters representing words rather than phonemes, but this is not the case. The alphabet is very much phonetic. Each "block" is a single syllable, so for example Hangul(한글) is Han(한)+gul(글).</p>
<p>Since syllables are made of phonemes, it is not surprising that the blocks consist of sub-components representing these phonemes. (It was surprising the first time I learned of this, because such an elegant solution to written language had not occurred to me - though upon further reflection, the trick is just "writing words more compactly" so it's not as novel as it is aesthetically pleasing.) Some insane person wrote a <a href="http://en.wikipedia.org/wiki/Hangul_consonant_and_vowel_tables">Wikipedia page</a> documenting every possible syllabic block in Korean, so all you need to do is memorise all ten thousand of these (give or take a few thousand) and reading Korean will become trivial. End of post. If this idea is appealing to you, I might suggest going to Cambridge to do Part III of the Mathematical Tripos.</p>
<p>The more elegant solution is to learn the alphabet. Each letter is called a "jamo", but they only occur inside blocks, sort of like quarks. Unlike quarks, we can still look at them individually. I'll include the <a href="http://web.uvic.ca/ling/resources/ipa/charts/IPAlab/IPAlab.htm">IPA</a> in [], and a 'translation' of IPA into my accent (mileage may vary). For pronunciation purposes, text is no replacement for audio, so I would suggest finding some videos, like <a href="http://www.youtube.com/watch?v=CdiR-6e1h0o">this one</a>, for example.</p>
<h3>Simple vowels:</h3>
<p>Simple vowels are made of horizontal or vertical lines and short strokes.</p>
<p>ㅣ [<strong>i</strong>] ("ee" in "tree")<br>
ㅏ [<strong>a</strong>] ("a" in "mad")<br>
ㅓ [<strong>ʌ</strong>] ("u" in "mud") </p>
<p>ㅡ [<strong>ɯ</strong>] (somewhere between the "oo" in "cool" and the "eu" in "eugh" - I have a really hard time differentiating this from ㅜ)<br>
ㅗ [<strong>o</strong>] ("o" in "bowl")<br>
ㅜ [<strong>u</strong>] ("oo" in "too") </p>
<h3>Complex vowels:</h3>
<p>Combinations of simple vowels (including diphthongs). I'm not going to include all combinations because many of them are self-evident given the simple vowels.</p>
<p>These ones are less obvious:</p>
<p>ㅐ [<strong>ɛ</strong>] ("e" in "bed")<br>
ㅔ [<strong>e</strong>] ("e" in "grey") </p>
<p>Generally, ㅗ or ㅜ combined with another vowel gives a "w-" sound, so for example ㅘ is "wah", ㅙ is "weh", and ㅟ is "wee".</p>
<p>There's no letter for "y" in Korean, so if you want to "y" up a vowel, double up on short strokes (I believe this process is called <em>'iotation'</em>. You can do something similar in Slavic languages with ь - Cyrillic comes a close second in the space-robot race.) You get:</p>
<p>ㅑ [<strong>ja</strong>] ("yah")<br>
ㅕ [<strong>jʌ</strong>] ("yuh")<br>
ㅛ [<strong>jo</strong>] ("yoh")<br>
ㅠ [<strong>ju</strong>] ("yoo") </p>
<p>We can extend this to the complex vowels, to get ㅒ for "yeh" and ㅖ for a slightly different "yeh".</p>
<h3>Consonants:</h3>
<p>Syllables are usually a consonant-vowel sandwich, so consonants can be "initial", "medial", or "final" (I'll write [<strong>i/m/f</strong>]), and the placement makes a (small) difference to the pronunciation of the letter.</p>
<p>ㄱ [<strong>k/g/k̚</strong>] ("k" as in "Kant", "g" as in "gravity", "k̚" as in "quark")<br>
ㄴ [<strong>n/n/n</strong>] ("n" as in "neutron")<br>
ㄷ [<strong>t/d/t̚</strong>] ("t" as in "tachyon", "d" as in "down", "t̚" as in "cat")<br>
ㅅ [<strong>s/s/t̚</strong>] ("s" as in "strange")<br>
ㅁ [<strong>m/m/m</strong>] ("m" as in "mass")<br>
ㅂ [<strong>p/b/p̚</strong>] ("p" as in "point", "b" as in "baryon", "p̚" as in "top")<br>
ㅇ [<strong>-/ŋ/ŋ</strong>] (This is just a silent placeholder in the initial position. In all others it's "ng", as in "ping")<br>
ㄹ [<strong>ɾ/ɾ/l</strong>] ("ɾ" as in "alveolar tap", a sound which is neither "r" nor "l") </p>
<p>Some consonants are obtained from others by <em>aspiration</em>. Aspiration is basically just adding air to the sound - so imagine trying to sneak a "h-" sound in after the consonant. In Hangul, the addition of a horizontal line seems to denote this aspiration, or a general 'softening' or alteration of the sound (in the case of the letter I like to think of as "j"). This produces:</p>
<p>ㄱ > ㅋ [<strong>kʰ/kʰ/k̚</strong>] ("kʰ" is an aspirated "k", oddly enough)<br>
ㄷ > ㅌ [<strong>tʰ/tʰ/t̚</strong>]<br>
ㅅ > ㅈ [<strong>tɕ/dʑ/t̚</strong>] ("tɕ" as in "charm", "dʑ" as in "jam")<br>
ㅈ > ㅊ [<strong>tɕʰ/tɕʰ/t̚</strong>] ("tɕʰ" as in "oh god send help")<br>
ㅂ > ㅍ [<strong>pʰ/pʰ/p̚</strong>] ("pʰ" as in <em>strangling noises</em>)<br>
ㅇ > ㅎ [<strong>h/ɦ/-</strong>] ("h" as in "hello", "ɦ" as in "cool whip")</p>
<h3>Doubled letters:</h3>
<p>There are also "double letters":<br>
ㄲ, ㄸ, ㅃ, ㅆ, ㅉ<br>
... which are "tense", so they're pronounced a bit like you're after spending the last hour reading articles about phonetics and just realised it's too late to watch Breaking Bad. "Damn it!" ~ "땀읻!"</p>
<p>I should stress that this entire post has very little to do with the Korean language. I don't know any Korean, but transliteration can be fun, and this article was largely about IPA. Trying to cram English into a foreign language really makes you appreciate phonetic differences.</p>
<p>치샔시챐파에대시추러...</p>
<p>피탤퍼이팰챜앧아퍀어퍀랟페펤... (curse you lack of "ɘ"!)</p>man cut and other simple yet useful unix bits2013-07-22T00:00:00+01:002013-07-22T00:00:00+01:00corcratag:None,2013-07-22:tips/2013-07-22-man-cut.html<p>Instead of just reading the man file, you could read this post about <code>cut</code>!</p>
<p>Printing columns ('fields') n to m (inclusive) from a file:</p>
<div class="highlight"><pre><span></span><span class="w"> </span><span class="n">cut</span><span class="w"> </span><span class="o">-</span><span class="n">d</span><span class="w"> </span><span class="o">[</span><span class="n">delimiter</span><span class="o">]</span><span class="w"> </span><span class="o">-</span><span class="n">f</span><span class="w"> </span><span class="n">n</span><span class="o">-</span><span class="n">m</span><span class="w"> </span><span class="n">filename</span><span class="w"></span>
</pre></div>
<p>Thus, removing the first n-1 fields from a file:</p>
<div class="highlight"><pre><span></span><span class="w"> </span><span class="n">cut</span><span class="w"> </span><span class="o">-</span><span class="n">d</span><span class="w"> </span><span class="o">[</span><span class="n">delimiter</span><span class="o">]</span><span class="w"> </span><span class="o">-</span><span class="n">f</span><span class="w"> </span><span class="n">n</span><span class="o">-</span><span class="w"> </span><span class="n">filename</span><span class="w"></span>
</pre></div>
<p><code>[delimiter]</code> is automatically a …</p><p>Instead of just reading the man file, you could read this post about <code>cut</code>!</p>
<p>Printing columns ('fields') n to m (inclusive) from a file:</p>
<div class="highlight"><pre><span></span><span class="w"> </span><span class="n">cut</span><span class="w"> </span><span class="o">-</span><span class="n">d</span><span class="w"> </span><span class="o">[</span><span class="n">delimiter</span><span class="o">]</span><span class="w"> </span><span class="o">-</span><span class="n">f</span><span class="w"> </span><span class="n">n</span><span class="o">-</span><span class="n">m</span><span class="w"> </span><span class="n">filename</span><span class="w"></span>
</pre></div>
<p>Thus, removing the first n-1 fields from a file:</p>
<div class="highlight"><pre><span></span><span class="w"> </span><span class="n">cut</span><span class="w"> </span><span class="o">-</span><span class="n">d</span><span class="w"> </span><span class="o">[</span><span class="n">delimiter</span><span class="o">]</span><span class="w"> </span><span class="o">-</span><span class="n">f</span><span class="w"> </span><span class="n">n</span><span class="o">-</span><span class="w"> </span><span class="n">filename</span><span class="w"></span>
</pre></div>
<p><code>[delimiter]</code> is automatically a tab space. You could also have ' ' (space), '<code>`'</code>, '<code>:</code>', '<code>-</code>', '<code>_</code>'. Apparently '<code>HELLO</code>' is not an acceptable delimiter, which is some kind of bug I guess.</p>
<p>If you just want a specific column, you could use <code>awk</code>:</p>
<div class="highlight"><pre><span></span><span class="err"> awk '{ print $n }' filename</span>
</pre></div>
<p>Or do some fancier things like - say* we have a file containing a list of chromosome numbers and SNPids and some other information separated into columns, and we want to extract just the chromosomes and SNPids, rewriting '<code>2</code>' as '<code>chr02</code>' etc. and including a tab space, we could write</p>
<div class="highlight"><pre><span></span><span class="err"> awk '{ if ($1<10) print "chr0" $1 "\t" $2; else print "chr" $1 "\t" $2 }' filename</span>
</pre></div>
<p>The double-quotation marks are necessary here. In <code>awk</code> it's not that column numbering intentionally starts from 1 (note that chromosomes, which are in the first column are accessed via <code>$1</code>), but <code>$0</code> contains the full line. So you could do</p>
<div class="highlight"><pre><span></span><span class="err"> awk '{ if ($1+$2 == 3) print $0; else print $1+$2,"is not 3" }' filename</span>
</pre></div>
<p>if for some reason you wanted to pick out lines whose first two columns sum to three. If you try doing that and <code>$2</code> or <code>$1</code> don't contain something which could reasonably be added (e.g. in the SNPid example) <code>awk</code> will just give weird output and not realise the horrible things it's doing, so be careful with that.</p>
<p>Note the comma (eg in <code>print $1+$2,"is not 3"</code>) just denotes a space. As per earlier, use <code>"\t"</code> to insert a tab.</p>
<p>You could do something similar to extract all the even or odd columns in a file by silencing those you don't want:</p>
<div class="highlight"><pre><span></span><span class="err"> awk '{ for(i=1;i<=NF;i+=2) $i="" }1' filename > evencols</span>
</pre></div>
<p>No, the <code>1</code> is not a typo. It just tells <code>awk</code> to print every line. Now, this will produce some unwanted spaces between fields, so we can get rid of the with <code>sed</code>:</p>
<div class="highlight"><pre><span></span><span class="err"> sed "s/^ //;s/ / /g" evencols</span>
</pre></div>
<p>The basic thing going on here is s/string_to_replace/with_this_string, separated by ; indicating a new command for <code>sed</code>. In the first one we're stripping a leading whitespace from each line - <code>^</code> indicates 'start of line', so we're replacing "white space at start" with "nothing". The second command is simply replacing double whitespace with single whitespace. I'm sure there are more rigorous ways to do this, but this worked for me.</p>
<p>What about finding things? Suppose I have a giant folder - how giant you say?</p>
<div class="highlight"><pre><span></span><span class="err"> ls . | wc -l</span>
</pre></div>
<p>This just pipes the output of <code>ls .</code> into <code>wc</code> which, with the <code>-l</code> flag counts how many lines we have. The folder I'm looking at has 948 things in it, because I am organised like that. I want to find a file with 'wolf' in the title, so I can do</p>
<div class="highlight"><pre><span></span><span class="err"> ls -l . | grep 'wolf'</span>
</pre></div>
<p>I inclued the <code>-l</code> flag on ls because I'm interested in things like the biggest file with <code>wolf</code> in its title. Supposing I had a worryingly large number of wolf-related files, I could get straight to the biggest one by piping more commands together:</p>
<div class="highlight"><pre><span></span><span class="err"> ls -l . | grep 'wolf' | sort -n | tail -1</span>
</pre></div>
<p><code>sort</code> outputs low to high, which is why we take the <code>tail -1</code> one.</p>
<p>Now, let's suppose I don't know which subdirectory my wolf file is in. I could do</p>
<div class="highlight"><pre><span></span><span class="w"> </span><span class="n">find</span><span class="w"> </span><span class="o">[</span><span class="n">directory</span><span class="o">]</span><span class="w"> </span><span class="o">-</span><span class="n">name</span><span class="w"> </span><span class="s1">'*wolf*'</span><span class="w"></span>
</pre></div>
<p>to find all files with '<code>wolf</code>' anywhere in their title in the directory <code>[directory]</code> and all subdirectories of it. To search from the current directory, use . as [directory], etc. To only find <code>wolf</code> files over a certain size (say 1 MB) from the current directory, we have</p>
<div class="highlight"><pre><span></span><span class="w"> </span><span class="n">find</span><span class="w"> </span><span class="o">[</span><span class="n">directory</span><span class="o">]</span><span class="w"> </span><span class="o">-</span><span class="n">name</span><span class="w"> </span><span class="s1">'*wolf*'</span><span class="w"> </span><span class="o">-</span><span class="k">size</span><span class="w"> </span><span class="o">+</span><span class="mi">1</span><span class="n">M</span><span class="w"></span>
</pre></div>
<p>(use <code>-1k</code> to get <code>wolf</code> files under 1 kB) or to find all wolf files, sort them by size, and pick out the biggest one, we do</p>
<div class="highlight"><pre><span></span><span class="err"> find . -name 'gray_wolf*' -ls | sort -k5 -n | tail -1</span>
</pre></div>
<p>The <code>-ls</code> flag tells <code>find</code> to give output in a sort of <code>ls</code> format. For me, the 5th column of this output is the file-size, so we sort based on this column (<code>sort -k5</code>), and the rest is the same as before.</p>
<p>*based on a real event</p>