As a psychologist, Tom Gruber is in awe of Facebook. As a computer scientist and citizen of the earth, it scares the crap out of him.

Facebook runs experiments on human behavior that psychologists can only dream about, Gruber says. The trials are done on millions of people, a sample size that's impossible in academia. Dozens of times a day, Mark Zuckerberg tweaks his artificial intelligence to see what will keep his 2.5 billion subscribers scrolling through Facebook, and to make them confuse advertising with news so they click on the ads, Gruber says.

"They have the world's largest psychology experiment at their disposal every single day," Gruber says. "They can do experiments that science can't do, at scale."

Gruber, who speaks at TechfestNW this April, is hardly a bomb-thrower. He is a pioneer in artificial intelligence and the co-inventor of Siri, the digital assistant on the iPhone that uses AI and speech recognition to answer billions of questions each year.

Since selling Siri to Apple in 2010, though, Gruber has become one of a small group of technologists who have grown wary of the AI they helped create. He plans to talk about the danger—and promise—of artificial intelligence at TechfestNW.

Facebook and YouTube have more than 2 billion users each, making them as big as the world's two biggest religions, Christianity and Islam, Gruber says.

"And I would add that even the people who pray to Mecca five times a day, only do it five times a day," Gruber says. "Our millennials check their phones 150 times a day."

Gruber has deep roots in techdom. He earned a bachelor's degree in computer science and psychology from Loyola University in New Orleans, got his Ph.D. in computer and information science from the University of Massachusetts, then did research at Stanford University for five years.

Siri grew out of a Stanford spinoff called SRI International. Gruber consulted at SRI in 2007, and, soon after, he and two others, Dag Kittlaus and Adam Cheyer, spun off newer digital-assistant technology that went beyond the DARPA work. They named the new company Siri, which means "beautiful woman who leads you to victory."

Siri is actually a collection of powerful neural networks: mathematical formulas running on computers that analyze huge amounts of data and learn the patterns within them. Turn a neural net loose on a million samples of spoken language, and it will start to recognize words and their meaning. No longer do programmers have to tell computers what to do, logic step by logic step.

Steve Jobs persuaded Gruber and his partners to sell to Apple in 2010 for some $200 million, according to Wired magazine.

Gruber retired from Apple in 2018 and founded Humanistic AI, a firm that helps companies use machine intelligence to collaborate with humans, not replace—or terrorize—them.

Unlike some AI doomsayers, including Tesla inventor Elon Musk and podcasting neuroscientist Sam Harris, Gruber thinks AI can be tamed. Right now, it's a science experiment gone wrong. Frankenstein never meant for his monster to become a killer, and Zuckerberg, he says, never intended Facebook to set us at each other's throats, over politics or anything else.

"My argument is that this is an unintended consequence," Gruber says. "We'll give them a pass on being evil geniuses. Maybe some of them are. But let's assume good intentions."

When it comes to Zuckerberg, assuming good intentions is controversial. In July, Facebook agreed to pay a record $5 billion fine to settle charges by the Federal Trade Commission that it abused users' personal information.

So call Gruber an optimist. He thinks the same algorithms that prey on our bad habits can be used to encourage good ones.

Tech companies make excuses for why they can't police their networks, and most involve money. So far, humans are better at sorting lies from truth, and hate from news. That means you have to hire a lot of humans, which is anathema to the tech monopolies. Gruber says they need to suck it up.

"It's like when the auto industry said, 'Air bags are going to put us out of business, so don't impose this onerous thing on us,'" Gruber says. "It's all bullshit."

And there's more. Why not run all these vast experiments on human behavior to improve human life, instead of wrecking it? Why not use AI to change the habits that lead to type 2 diabetes, heart disease, hypertension, and suicide?

"We have weak theories about what makes people tick, and what to do to help them do better things," Gruber says. "But AI has shown that if you want to get 2 billion people addicted to something that's not good for them, you can do it."

AI doesn't know if it's operating for good or evil, Gruber says. Someday it may, but for now, it's up to humans to direct it.

So far, we've been crappy shepherds.

GO: TechfestNW is at Portland State University's Viking Pavilion, 930 SW Hall St., techfestnw.com. Thursday-Friday, April 2-3. Visit the website for tickets.