"They Saved Lisa's Brain" is the twenty-second and penultimate episode of the tenth season of the American animated television series The Simpsons. It first aired on Fox in the United States on May 9, 1999. In the episode, after writing a thoughtful letter to the Springfield Shopper, Lisa is invited to join the Springfield chapter of Mensa. When Mayor Quimby later flees Springfield, the group takes control of the town, hoping to improve the lives of Springfieldians through the rule of the smartest. Meanwhile, Homer poses for a series of erotic photos.

"They Saved Lisa's Brain" was directed by Pete Michels and written by Matt Selman, although the idea for the episode was pitched by former staff writer George Meyer. It featured the first official appearance of Lindsey Naegle and was the first episode in which theoretical physicist and cosmologist Stephen Hawking guest-starred as himself. The Simpsons staff wanted Hawking to guest-star because they needed someone who would be smarter than all of Springfield's Mensa members, and because they had heard that he was a fan of the show. The episode features references to Star Trek, painter Vincent van Gogh and architect Frank Lloyd Wright, and mentions the theory of the universe being toroidal, meaning shaped as a doughnut. At the end of the episode, during the Gracie Films logo, Homer yelled, “Larry Flint is right! You guys stink!”

In its original broadcast, "They Saved Lisa's Brain" was seen by approximately 6.8 million viewers, a very low amount for the series.

Plot A low-fat pudding, Grandma Plopwell's, is the sponsor of a Springfield gross-out contest that promises a luxurious trip to the winner. Many Springfield residents enter the contest, but things do not go well when one of the judges, Rainier Wolfcastle, declares himself the winner for "being seen with you freaks". The contest ends in a riot and Lisa is hit in the face twice with pudding. She denounces Springfield for its anti-intellectualism in an open letter published in the Springfield Shopper. Whilst it is ignored by most of the town, it impresses the Springfield chapter of Mensa.

Lisa joins the local Mensa chapter, alongside Principal Skinner, Comic Book Guy, Dr. Hibbert, Professor Frink, and Lindsay Naegle. After being bullied out of their reserved gazebo at a park by drunks and Chief Wiggum, they fear that Springfield's quality is poor because the city's stupidest residents have power over their civic institutions. The Mensa group goes to confront Mayor Quimby about the gazebo incident, causing him to escape the city when he mistakenly believes the group has evidence about his corruption. The town's charter states that in the absence of the mayor, the town is to be governed by a council of learned citizens.

Now in control of Springfield and governing the town as a geniocracy, the group hopes that things will become much better. Their implemented ideas, including the adoption of metric time and the removal of green lights from stoplights to ease traffic congestion, elevate Springfield above East St. Louis on the list of America's 300 Most Livable Cities. However, the group allows power to go to their heads and the members begin to fight among themselves. Various schemes and their wildly unpopular plans, aired at a public meeting, including the banning of certain sports and the imposition of limits on procreation similar to the act of pon farr from Star Trek, further expose the rifts inside the group.

The Springfield townspeople, wishing power would revert to idiots, surround the intellectuals in an angry mob and bring an end to Mensa's rule. Stephen Hawking appears to see what the Mensa group is up to and makes it clear he is unimpressed. However, he saves Lisa from being seriously injured by the mob. In the end, Hawking and Homer go to Moe's Tavern for a drink.

In the episode's secondary storyline, Homer steals a gift certificate during the post-contest riots and has erotic photos taken of himself as a gift to Marge, who is at first impressed, but becomes distracted by the interior design Homer did in their basement.

Production "They Saved Lisa's Brain" was written by Matt Selman and directed by Pete Michels. It originally aired on the Fox network in the United States on May 9, 1999. Although the episode's first draft was written by Selman, the idea for the episode was pitched by former staff writer George Meyer. In the episode's setpiece, Homer and Bart participate in a gross out contest, while Marge and Lisa are in the audience. According to Selman, the writers took inspiration from real gross out contests, which were "sweeping the nation" at the time. Before the contest in the episode, the spectators are given free samples of a pudding called Grandma Plopwell's. The name of the pudding was inspired by a brand of pies called Aunt Freshly, which the Simpsons writers usually ate at the time.Selman, Matt. (2007). Commentary for "They Saved Lisa's Brain", in The Simpsons: The Complete Tenth Season [DVD]. 20th Century Fox.

The episode features the first official appearance of Lindsey Naegle, a sleazy businesswoman who has since become a recurring character in the series. While different versions of the character had appeared in the series before, namely in the season 8 episode "The Itchy & Scratchy & Poochie Show", the season 9 episode "Girly Edition", and the season 10 episode "Make Room for Lisa", the character's final design was first seen in "They Saved Lisa's Brain".Appel, Rich. (2007). Commentary for "They Saved Lisa's Brain", in The Simpsons: The Complete Tenth Season [DVD]. 20th Century Fox. The episode also mentions the character's name for the first time. Naegle's name was partly based on Selman's agent Sue Neagle, and Lindsey was chosen as the first name because Selman thought it sounded "annoying" and "pretentious". Naegle is voiced by Tress MacNeille, who Selman described as a "huge asset" to the series, and stated that she "breathes life" into the character.

"They Saved Lisa's Brain" features English theoretical physicist and cosmologist Stephen Hawking as himself. According to executive producer and current showrunner Al Jean, Hawking was asked to guest-star because "we [they] were looking for someone much smarter than all the Mensa members [in Springfield]", and so they "naturally thought of him". Selman added that the Simpsons staff had heard that Hawking was a fan of the show, and that Hawking's family members wanted him to guest-star. Bill Mann of The Press Democrat argued that Hawking was chosen to guest star in order to boost the series' ratings during the May "sweeps". Mann wrote that "sweeps" are "used to set local TV ad rates for the months ahead".

Hawking recorded his performance in the first week of December 1998. In her book Stephen Hawking: a biography, Kristen Larsen wrote that Hawking almost missed his recording session, as his wheelchair broke down two days before his flight to Los Angeles, where the recording took place. In order to make the necessary repairs, Hawking's graduate assistant Chris Burgoyne, aided by a technician, worked a 36‑hour shift. Hawking was 40 minutes late when he arrived in Los Angeles. When he met the Simpsons staff, he apologized, saying "Sorry for being late."Hauge, Ron. (2007). Commentary for "They Saved Lisa's Brain", in The Simpsons: The Complete Tenth Season [DVD]. 20th Century Fox. According to Selman, Hawking was very humble regarding the episode's jokes about him, and stated that he "took a lot of shots" at himself. The only note that Hawking gave regarding the script was that he did not want to be portrayed as drunk in the episode's last scene, in which he is discussing astronomy with Homer in Moe's tavern.

Because of his motor neurone disease, Hawking was unable to speak, and he communicated using a custom-made computer. With small movements of his body, Hawking wrote a text onto the computer, which was then spoken by a voice synthesizer. Because of this, Hawking had to write all his lines on his computer, while the staff recorded them by placing a microphone in front of the computer's speaker. "It's easy to do a fake Stephen Hawking in your comedy TV show", Selman said in the DVD commentary for the episode. "Any computer can sound just like his computer, but every line that we wrote for him, he typed in himself and we recorded with our microphones as if it had come out of a regular mouth." Some of Hawking's lines were difficult to record. In particular, the word "Fruitopia" was difficult for Hawking's computer to "put together" correctly, and it "took forever" to make the word sound right from the voice synthesizer.

Themes and cultural references In their book The Simpsons and Philosophy: The D'oh! of Homer, William Irwin, Mark T. Conard and Aeon J. Skoble wrote that "They Saved Lisa's Brain" in detail explores "the possibility of a utopian alternative to politics as usual in Springfield". They described "They Saved Lisa's Brain" as an "epitome" of The Simpsons diverse comedic humor, and wrote that it can be "enjoyed in two levels", as both "broad farce" and "intellectual satire". As an example of the episode's farcical humor, they referred to the episode's subplot, which, they wrote, "contains some of the grossest humor in the long history of The Simpsons." At the same time, the episode is "filled" with what they described as "subtle cultural allusions", such as the design of Mensa group's locale, which is based on the house of American architect Frank Lloyd Wright. Likewise, Lisa's challenge to Springfield calls attention to the "cultural limitations of small-town America", while the episode also argues that intellectual disdain for the common man can be carried too far, and theory can "all too easily lose touch with common sense". They also argued that the episode, as well as the series as a whole, offers a kind of intellectual defense of the common man against intellectuals, which they opined "helps explain its popularity and broad appeal [...] ["They Saved Lisa's Brain"] defends the common man against the intellectual, in a way that both the common man and the intellectual can understand and enjoy".

In the last scene in the episode, Hawking and Homer are seen discussing the universe in Moe's tavern. Scully stated that the scene was included because it "was a chance to get the world's smartest man and the world's stupidest man in the same place". In the scene, Hawking tells Homer "Your theory of a donut-shaped universe is intriguing... I may have to steal it." In his book What's Science Ever Done For Us?: What The Simpsons Can Teach Us About Physics, Robots, Life and the Universe, Paul Halpern wrote that in mathematics, a "donut-shape", the three-dimensional generalization of a ring, is referred to as a torus. The generalization of a torus, any closed curve spun in a circle around an axis, is called a toroid. According to Halpern, Hawking's line references the fact that there are "genuine" scientific theories that the universe is toroidal.