← Latest papers
🤖 machine learning

Classification of integers based on residue classes via modern deep learning algorithms

This paper demonstrates that despite the apparent simplicity of classifying integers by prime residues, deep learning models, AutoML platforms, and Large Language Models fail without appropriate feature engineering, whereas a method utilizing linear regression on Fourier series basis vectors succeeds, underscoring the continued critical importance of feature engineering in modern machine learning.

Original authors: Da Wu, Jingye Yang, Mian Umair Ahsan, Kai Wang

Published 2026-07-15
📖 6 min read🧠 Deep dive

Original authors: Da Wu, Jingye Yang, Mian Umair Ahsan, Kai Wang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Magic of Numbers and the Limits of Machines

Imagine you are playing a game where you have to sort a giant pile of numbered rocks. Some rocks are "even" (they can be split into two equal piles), and some are "odd" (one rock is left over). For humans, this is a breeze; we just look at the very last digit. If it's a 2, 4, 6, 8, or 0, we know it's even. But what if the game gets trickier? What if you have to sort rocks based on whether they can be divided by 3, 7, or other prime numbers? Humans have special tricks for this, like adding up all the digits of a number to see if the total is divisible by 3. It's a bit like a secret code we learned in elementary school.

Now, imagine handing this rock-sorting game to a super-smart robot. You might think, "If the robot is smart enough to write poetry or drive a car, it should be able to sort rocks by number rules, right?" This is the big question scientists are asking in the field of Machine Learning. Machine learning is like teaching a computer by showing it millions of examples instead of giving it a rulebook. The computer looks for patterns on its own. There are also "AutoML" tools, which are like magic boxes that automatically pick the best robot brain for the job, and "Large Language Models" (LLMs), which are computers trained on almost all the text in the world, making them seem like they know everything. But here's the catch: just because a computer is big and smart doesn't mean it understands the logic of numbers the way we do. It might just be memorizing answers or guessing.

The Great Number Sorting Experiment

In this study, a team of researchers from the University of Pennsylvania and Children's Hospital of Philadelphia decided to put these high-tech robots to the test. They wanted to see if modern deep learning algorithms, automated tools, and even the world's most famous chatbots could figure out the rules for dividing numbers by small prime numbers (like 2, 3, and 7) without being explicitly told the rules.

The Setup: Giving the Robots a New Language
The researchers started by feeding numbers to different types of computer brains. But here's the twist: they tried feeding the numbers in different "languages" or formats.

  • Raw Numbers: Just the number itself (e.g., 123).
  • Binary: The computer's native language of 0s and 1s (like a light switch being on or off).
  • Digit Lists: Breaking the number into its individual parts (1, 2, 3).
  • Digit Sums: Adding the digits together (1+2+3 = 6).

They tested these inputs on three types of systems:

  1. Deep Neural Networks: Complex layers of math that try to mimic the human brain.
  2. AutoML Platforms: Automated systems from big tech companies (Amazon, Google, Microsoft) that are supposed to find the best solution automatically.
  3. Large Language Models (LLMs): Famous AI chatbots like GPT-4, LLaMA, and Falcon, which are supposed to know "everything."

The Shocking Results: The Robots Got Stuck
The results were a mix of "Wow" and "Oops."

When the researchers gave the robots the numbers in their raw form (just the number 123), the deep learning models and AutoML tools were terrible. They guessed randomly, getting about 50% right for even/odd numbers and only 33% right for dividing by 3. It was as if the robots were throwing darts blindfolded. The "magic boxes" (AutoML) failed completely because they didn't know how to look at the numbers in a way that revealed the pattern.

However, when the researchers used feature engineering—which is just a fancy way of saying "giving the robot a better hint"—the robots suddenly became geniuses.

  • When they converted numbers to binary (0s and 1s), the robots instantly figured out the even/odd rule with 100% accuracy. It turns out, the last digit in binary is the answer.
  • When they gave the robots the sum of the digits (the trick humans use for dividing by 3), the robots also achieved 100% accuracy.

But here is the most interesting part: The robots didn't "learn" the rule on their own. They only succeeded because the humans gave them the answer in a different format. The study showed that without these carefully crafted hints, even the most powerful neural networks couldn't figure out the pattern, no matter how big or complex they were.

The Fourier Series: A Mathematical Shortcut
The researchers also tried a different approach that didn't rely on deep learning at all. They used a method called Fourier series regression. Think of this as using a special wave-pattern tool to find the rhythm in the numbers. Since dividing by 3 or 7 creates a repeating pattern (like a song that loops every 3 or 7 notes), this mathematical tool could predict the answer perfectly with very few examples. It was fast, simple, and 100% accurate for the cases they tested (mod 3 and mod 7), proving that sometimes a simple, old-school math trick works better than a giant, complex AI.

The Chatbots: Smart but Clueless
Finally, the team asked the famous chatbots (like ChatGPT and open-source models) to explain the rules.

  • For small numbers like 2 or 3, the chatbots could sometimes give the right answer.
  • But as soon as the researchers asked about larger prime numbers (like 7, 11, or 23), the chatbots started to hallucinate. They consistently produced incorrect and uninformative replies, making up rules, giving wrong math, or simply saying, "Use the modulo operator" (which is just telling the computer to do the math it was supposed to figure out).
  • Even the newest GPT-4, when asked to design a computer program to solve this, failed to create an efficient solution. It couldn't figure out the right "feature engineering" or the best algorithm to use.

The Big Takeaway

The main lesson from this paper is that having a super-smart computer isn't enough; you have to teach it how to look at the problem.

The researchers found that "feature engineering"—the human act of translating raw data into a format that reveals the hidden pattern—is still the most important step. Even in an era where we have "AutoML" (machines that pick the models for us) and "LLMs" (machines that know almost all the words in the world), these tools cannot magically discover the rules of math on their own. They need a human to say, "Hey, look at the digits, or look at the binary, or add them up."

Without this human guidance, the most advanced AI in the world is like a student who has memorized the dictionary but doesn't know how to do arithmetic. The study concludes that while AI is powerful, it still relies heavily on human insight to turn raw data into a solvable puzzle. The robots are fast, but they still need us to hold the flashlight.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →