Count from one up to fifty. Simple, right? Now try that while watching a video about the history of math and listening to a song about multiplication, as ten nearby people shout random numbers. 

Not so easy, is it?

When you're surrounded by distractions, focusing on one task can be a challenge — for people and for artificial intelligence. In a type of AI called large language models (LLMs), success or failure at fulfilling a prompt can depend on how well the algorithm filters out irrelevant data while prioritizing useful information and patterns.

Yuan Zhao '26 researches how to analyze decision-making in AI models; his work was presented at two scientific conferences this year and published in July in the Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics, and on Aug. 1 in the Journal of the Acoustical Society of America. Co-authored by Ali Abdi, an NJIT professor of electrical and computer engineering, the papers have applications for improving AI's detection of hate speech, to make identification of this pervasive online problem more accurate and accessible. 

Zhao graduated from NJIT with a Ph.D. in electrical engineering, focusing on machine learning, statistical modeling and LLM performance analysis. While earning his degree under Abdi's guidance, he investigated techniques for improving LLM pattern detection based on an economic theory called rational inattention. 

According to the theory, a person's decision-making is affected by the difficulty and cost of extracting critical information from an environment flooded with non-essential data. When information costs more to retrieve — if lots of "noise" obscures it, for example — it becomes harder to process accurately. In that situation, making a decision requires deliberately ignoring some data. In other words: how someone decides upon an action depends on the information they choose to pay attention to. Typically, information that provides the biggest reward gets the most attention. 

While this theory was originally developed to explain human behavior in the context of economics, Zhao suspected that it could also be applied to LLMs.

Yuan Zhao, wearing PhD regalia, stands next to a sign reading "Elisha Yegal Bar-Ness Center for Machine Intelligence, Communications and Signal Processing"

As Yuan Zhao '26 worked toward a Ph.D. in electrical engineering, he explored ways to analyze decision-making in large language models and monitor their performance.

One use for an LLM's pattern-detecting prowess is identifying hate speech online. Hate speech regularly appears in public forums, gaming sites and social media platforms. But despite lists of recognized terms and guidelines for identifying hate speech, LLMs often misclassify content that uses slang or coded language to disguise intent. For LLMs that scan for spoken hate speech using automatic speech recognition systems, background audio or imperfect pronunciation can introduce transcription errors that obscure the words, even when their meaning is clear from the context.

Zhao applied rational inattention theory to LLM performance in hate speech detection by observing how an LLM's accuracy changed when those distractions were present. He then built a rational inattention model that would behave like those LLMs, to predict their results. Using a hate speech dataset, he found that the rational inattention model could predict how an LLM would perform under different circumstances with varying amounts of "noise." 

His approach sheds light on LLMs' decision strategies and could improve their accuracy, he explains. 

"Using LLMs to detect hate speech provides a new angle for understanding how LLMs sort text into predefined groups," Zhao wrote. "This work explores how rational inattention theory can provide a new perspective on understanding and interpreting LLM-based classifiers, using hate speech detection as an application."

A learning experience

Zhao first published his research in the Proceedings of the 57th Annual Conference on Information Sciences and Systems (CISS), held in 2023 at Johns Hopkins University in Maryland. In May 2026, he attended the annual meeting of the Acoustical Society of America in Philadelphia, where he gave a lecture, showcased a poster and participated in a press conference. In July, Zhao brought his research, “Interpretability of LLM Classifiers via the Rational Inattention Theory with Application to Hate Speech Detection,” to the Association for Computational Linguistics 2026 meeting in San Diego.

Submitting papers and giving presentations, Zhao discovered, sometimes also required dealing with inattention. Explaining to programmers, engineers and scientists — who were unfamiliar with economics — how an economics theory could apply to LLMs was not always easy, he says. But when his audience shared "Aha!" moments and responded with positive feedback and suggestions for future explorations, it reassured him that he was on the right track. 

"It's a learning experience," he says.

Post-graduation, Zhao hopes to continue his research in academia, collaborate with scientists in other disciplines or further develop AI and LLM technologies in industry.

"I'm looking in multiple directions at this stage," says Zhao. "This is still an area with a lot of room to explore."