Sunday, June 29, 2025

Gaslight

As an urban kid, my first encounter with the will-o’-the-wisp was through literature. In the dreary journey to Mordor in The Lord of the Rings, Frodo and Sam make their way through the Dead Marshes; Gollum warns them not to follow the lights that can lead them astray. For Harry Potter readers, the equivalent creature is the hinkypunk. Wikipedia defines it as an “atmospheric ghost light… dancing or flowing in a static form, until noticed or followed, in which case they visually fade or disappear”. Today, their lore has been transformed into the kid-friendly version of the jack-o’-lantern at Halloween.

 

We now know something about the chemistry that causes this luminescence – oxidation reactions involving methane and phosphines, gases released in marshland from decaying organic matter. Air currents play a role in the wispy behavior. While I’ve personally never seen this before – I don’t visit marshlands in poorly lighted areas – it is apparently spooky-looking. In his latest book, It’s a Gas, author Mark Miodownik shares historical writings about such spooky observations. I learned that a Major Blesson, from Napoleon’s army, did some early experiments to figure out what was going on and concluded that the wisps were “caused by flammable gas bubbling up from the bottom of the marsh”.

 

Living in an age of electric lights in urban areas, I have scant notion of what it would really be like to have experienced what most of humanity knew when the sun went down. Darkness. Danger. And the fear of not being able to see what might be lurking nearby. (Yes, I could go camping in some remote area to see the stars, but I like my creature comforts.) Miodownik discusses the “anatomy of a flame” from a wood fire, and how careful observations led to mass production of charcoal and tar. Folks also discovered that the invisible released gas was also explosive: Methane. In the marshes we can thank anaerobic microorganisms that eat carbon dioxide and poop methane.

 

Enter the scientists and engineers: Could methane gas be used to light the streets and households of urban areas? Can we shoo away the dark and eliminate the spooky? It was also a safety issue. You might fall into a cesspool or get mugged. In 1801, the inventor Philippe Lebon rigged a system for a hotel in Paris. According to Miodownik, “so marvelous was the spectacle of will-o’-the-wisps flickering away around every corner that the public happily paid three francs to enter and see the wonderland he had created.” But that first system didn’t catch on. It was the stink. Not from odorless methane, but from small amounts of hydrogen sulfide that were naturally part of the gas mix. British engineers eventually figured out how to remove the stink: one step in their refining process involved bubbling the gas mixture through lime water (calcium hydroxide solution) which reacts with acidic hydrogen sulfide.

 

Storing gas was a tricky business. You had to compress it. Then you had to release it at the right pressure to get optimal lighting while avoid too many fumes from incomplete burning. Then there was the problem of gas leaks. Today, a tiny amount of methanethiol, a compound very similar to hydrogen sulfide, is added so our noses can detect the smell of a gas leak. In a mere 25 years after Lebon’s demonstration, any large town in Britain had gaslight. Eventually gaslight was replaced by electric light as science marched onward.

 

The word gaslight has returned to our vocabulary in the twenty-first century. As women entered the workforce in ever-increasing numbers and began to vie for positions in leadership, boorish men took to “gaslighting” them. Miodownik relates that the phrase coms from a 1938 play titled Gaslight whereby a conniving husband tries to manipulate his wife into thinking she is insane “by dimming the gaslights in their home, and when she notices, he claims the lights are not dimmer – it is all in her mind.” In a former age, gaslight illuminated. Now it obscures. What will it do in tomorrow’s age?


Sunday, June 22, 2025

Educating AI

One reason my blog writing has fallen off the past year – I’m ambivalent about bots scraping my data to train AI models. But honestly, I’m not that great a writer, and it’s not like the bots are mining gold. I just need to get over myself and keep sharpening my writing practice, be it on this blog or elsewhere.

 

I just finished reading The Alignment Problem by Brian Christian. While the issue of AI ethics and the dangers posed by advanced AI are the main theme, what I spent time mulling over was comparing the educating of AI with the educating of human students. There are differences between human brains and machine learning neural networks, but the bigger difference is the wetware of the entire human body-organism, which cannot be separated into dry hardware and software.

 


Christian launches the historical story with Skinner’s behaviorism, Turing’s computing machines, and the neuron assembly of McCulloch and Pitts. (I didn’t know Pitts was such an enigmatic character until reading this book!) This is the framework of reinforcement learning. The reward hypothesis states that “all of what we mean by goals and purposes [is essentially] the maximization of the cumulative sum of a received scalar reward”. Shoot for the high score! Not surprisingly, Atari and other early video games were utilized in the training process. (I also learned that Montezuma’s Revenge, a game I played in the 1980s, is particularly tricky for an AI to get good at and represented some sort of gold standard.) What made the world pay attention was when AI beat grandmasters at Chess and Go.

 

I appreciate Christian going through the challenges of any training method. (He also carefully distinguishes reinforcement learning from supervised and unsupervised learning.) These include the problem of the terseness of a scalar reward or punishment, compounded by a delay in knowing that a much earlier blundering move may have cost the game. Turns out “reinforcement learning is less like learning with a teacher than learning with a critic. The critic may be every bit as wise, but is far less helpful.” There’s an interesting story on the “dopamine puzzle” that leads to a learning model (known as temporal difference) that what’s really being valued is the “error in its expectation of future rewards”.

 

The most interesting part for me was Chapter 5 (“Shaping”) on the Problem of Sparsity. Essentially, “if the reward is defined explicitly in terms of the end goal, or something fairly close to it, then one must essentially wait until random button-pressing, or random flailing around, produces the desired effect. The mathematic show that most reinforcement-learning algorithms will, eventually, get there…” but it’s inefficient and takes too darn long. The solution is to put together a Curriculum. That’s what we do as human educators. I break down the learning of chemistry into steps; I set tasks for the students; I try to motivate them; and there’s a rewards system in terms of points and a final grade. But creating the right incentives in AI training turns out to be quite tricky. Specifying certain steps along the pathway often does not have the desired outcome. Evolution has had hundreds of millions of years to shape humans, dolphins, elephants, and octopi, all naturally intelligent creatures among many others.

 

Can you get beyond external reinforcement strategies? Can you build in intrinsic curiosity into a computer? Can you value novelty? There are some clever tricks to do this. OpenAI (now famous for ChatGPT) is profiled for their early efforts working on Atari-arcade-like games. Can we learn from how humans and apes learn? Can computers learn through imitation? Do they learn the same way? I learned that human children in some situations over-imitate compared to chimpanzees; “children are from a very young age, acutely sensitive to whether the grown-up demonstrating something is deliberately teaching them, or just experimenting.” Why does this work? It “allows the student (be it human or machine) to learn things that are hard to describe.” The OpenAI folks managed to get an AI to beat Montezuma’s Revenge by watching YouTube videos of many human players.

 

This may be why taking students through worked examples, then letting them try simpler problems, before adding complexity to a more sophisticated problem is a pedagogical approach that works well, at least for the subject of chemistry. Many of these principles came from folks doing research into teaching and learning math. There’s also a tricky balance between intrinsic and extrinsic motivational approaches. It’s not that one always works better than the other. I’m not sure that final grades, which I assign based on numerical scores, are the best value function that most of my students strive towards. I understand that grades loom large for increasingly stressed students in what they perceive to be a global cutthroat career market. My generation did not experience the pressures they are facing now. With AI chomping at their heels as a competitor, the business of educating AI may be existential for them, even if they don’t realize it yet.