UC Berkeley News


 Appearances aside, Ken Goldberg, left, and Tavi Nathanson view humor through the prism of rigorous mathematics. (Peg Skorpinski photo)

So an EECS prof and an undergrad walk into a computer lab.
Jester 4.0 may seem like a lot of laughs, but to Ken Goldberg and Tavi Nathanson, jokes about dumb blondes and Chuck Norris are merely the setup for adventures in higher math

| 13 February 2008

"Lemme understand this . I'm funny how?" demanded Joe Pesci, playing the impish sociopath Tommy DeVito in the 1990 mob movie Goodfellas. "I mean, funny like I'm a clown? I amuse you? I make you laugh?.What do you mean funny, funny how? How am I funny?"

Improve the diction, lose the badgering tone, and delete the expletives hiding amid the ellipses - on second thought, leave the expletives - and you've got a mission statement for a Berkeley research project. The punchline - wait for it - is algorithms.

And no, that's not funny. Or is it?

"Funny how?" - or, rather, "How funny?" - is the question being asked by Ken Goldberg, Tavi Nathanson, and a so-called recommender system called "Jester 4.0: Jokes for Your Sense of Humor." Goldberg, an engineering professor known for his machine-assisted art, and Nathanson, a senior majoring in electrical engineering and computer sciences, are employing a sophisticated algorithm to usher humor into the 21st century, even if some of the jokes are a bit stale. (Though Clinton jokes, they note, are mounting a comeback.)

Nathanson, an unabashed fan of the emergent genre of Chuck Norris jokes, joined the Jester project in the spring of 2006, when Goldberg was looking for someone to help update the program he first launched in 1998. By 2003, some 75,000 laugh-lorn computer users had visited the site, which has attracted interest from entrepreneurs wanting to take it commercial. The premise is simple enough: First-time visitors rate eight jokes on a continuum from "less funny" to "more funny." Jester then assesses the user's sense of humor, and serves up jokes to match.

The gags range from bland to bawdy - if you're offended by casual profanity, or by gentle pokes at ethnicity and religion, Leno's a safer bet - but their comedy value is up to each individual user. Humor, it turns out, is a funny thing. And that's the point. Where standups crave laughs, Goldberg and Nathanson want data. The jokes are bait. The visitors' ratings - 4 million-plus and counting - are the fish.

Thus do a pair of Berkeley intellects wade intrepidly into the murky waters of Polish jokes and dumb-blonde gags once trolled by the likes of Henny Youngman and Bazooka Joe.

A sample joke from Jester:

"Two kindergarten girls were talking outside. One said, 'You won't believe what I saw on the patio yesterday. a condom!'

"The second girl asked, 'What's a patio?'"

Rim shot. But seriously.

Take my project.please

In the spring of 2006 Nathanson, then completing his sophomore year, e-mailed Goldberg to inquire about possible research projects. They met, and Goldberg - a man renowned for cutting-edge art and creative Internet-based experiments - told him what he had in mind.

"I thought, 'Huh, that's. interesting,' " Nathanson recalls, laughing. "A joke recommender - it's just not something I would have expected to work on." But he also thought it sounded like fun, "which is not something you can say for most research projects you could get involved with." The fact that Jester was a web application, something he actually was interested in, sealed the deal.

He worked on the project independently over the summer. "I gave Tavi the code and said, 'See what you can do with it,' " Goldberg says. The undergrad not only made "a huge amount of progress" in overhauling the program - as Nathanson describes it, "basically taking the old stuff and rewriting it using modern languages" - but wound up deciding to pursue his master's in computer science at Berkeley. That, says his professor, will let him "do more than the interface and database and graphics, but really get into the mathematics of it."

The mathematics, indeed, are daunting. Beneath its jokey exterior, Jester matches your taste in humor to that of other users via a process known as collaborative filtering, which also drives the recommendations of sites like Amazon and Netflix. Jester is built on a complex algorithm called Eigentaste, which the campus patented in 2003.

Goldberg came up with Eigentaste after mentions in Wired and elsewhere sent more than 10,000 users to the original Jester, overwhelming the site. "It went crazy," Goldberg says. "It completely melted down our system." To make the program more scaleable, he borrowed a technique from the field of pattern recognition called "principal-component analysis," and Eigentaste - the name is a tip of the hat to eigenvalues and eigenvectors - was born.

And though the algorithm has grown more sophisticated, the underlying idea remains the same. While commercial sites boast recommender systems for books, CDs, and movies, Goldberg seized on jokes because he needed data, and because they're copyright-free, popular, and easy for users to evaluate. Jester itself - the name notwithstanding - is as mirthless as Dick Cheney at an ACLU fundraiser.

"The computer doesn't know anything about the jokes - every joke is just a black box, the same as it would be for a movie or a film," Goldberg explains. "It just says, OK, these are just numbers, items. What it does is ask humans to rate these items. And then, depending on how they rate them, it looks for statistical clusters, patterns. And that helps you identify people with similar tastes.

"Once you've classified users, then you can start to say, OK, someone in your taste cluster thought this other joke or movie or book was good, so I'll recommend that to you. That's the idea in a nutshell."

The statistical need for questionable gags - that is, those whose actual humor content is debatable - is also a reason Jester users continue to find so many "high variance" jokes, including some from the ever-growing oeuvre of Chuck Norris jokes. For the uninitiated, here's a favorite of Nathanson's: "Chuck Norris' tears cure cancer. Too bad he never cries."

"I find that funny. A lot of young people find that funny," he says, piercing the heavy silence that greets his delivery. "Clearly you don't."

His audience of one, it's true, belongs to the elephant-joke generation. Not that there's anything wrong with that.

It's not just jokes, folks

The current version of Jester randomly places users into one of two iterations of Eigentaste. Feedback from those who draw the newer algorithm, Eigentaste 5.0, influences the jokes they get for as long as they go on rating them. Recommendations for the rest, for the time being, are based solely on how they rate the initial set of eight jokes.

That's slated to improve, as are the quality and variety of the gags themselves. Yet while math may not be easy - to paraphrase a show-biz truism - comedy is hard. And the hardest part is finding the jokes.

"There isn't a great central joke site right now. There's no Google for jokes," laments Goldberg, who's received a few from his brother-in-law, comedian-filmmaker Albert Brooks. "We have a place on the site that lets you submit new jokes, and most of them are terrible, so we can't rely on that."

But jokes were never the end, merely a means to perfecting faster, more serious - and, arguably, more socially useful - applications. "Anything where you feel deluged, this kind of tool could be very useful in helping you pick through the huge haystacks of information," Goldberg says.

Adds Nathanson, "I always have in the back of my mind, What applications can we come up with for this?" They're already working on a charity program - tentatively dubbed "Donation Dashboard" - that will recommend portfolios of nonprofit organizations to would-be supporters based upon their interests, desired giving levels, and other preferences. As with Jester, the site will employ collaborative filtering to cluster users, in this case like-minded donors, and match them to the most suitable suite of organizations.

Goldberg, who also directs the campus's Center for New Media, has had discussions with executives at craigslist - which recently gave the center $1.6 million for an endowed chair - about promoting Donation Dashboard, which he hopes to launch in March.

Meanwhile, the pair continues to build what Goldberg calls "one of the largest data sets for research in this field," all of it available for others to mine and sift through their own algorithms. Nathanson recently gave a presentation on Eigentaste to a conference on recommender systems, and a number of published papers on Eigentaste similarly attest to the rigorous scholarship behind it.

And speaking of science. here's Jester: "What does an atheist say during an orgasm? 'Oh Darwin! Oh Darwin!'"

Read and rate jokes by visiting Jester at eigentaste.berkeley.edu/user/index.php. To receive an e-mail alert of Donation Dashboard's launch, sign up at dd.berkeley.edu.

[an error occurred while processing this directive]