In late March, a judge in Wiesbaden, Germany, found herself playing the uncomfortable role of art critic. On trial before her were two men accused of forging paintings by artists including Kazimir Malevich and Wassily Kandinsky, whose angular, abstract compositions can now go for eight-figure prices. The case had been in progress for three and a half years and was seen by many as a test. A successful prosecution could help end an epidemic of forgeries – so-called miracle pictures that appear from nowhere – that have been plaguing the market in avant-garde Russian art.

But as the trial reached its climax, it disintegrated into farce. One witness, arguably the world’s leading Malevich authority, argued that the paintings were unquestionably fakes. Another witness, whose credentials were equally impeccable, swore that they were authentic. In the end, the forgery indictments had to be dropped; the accused were convicted only on minor charges.

The judge was unimpressed. “Ask 10 different art historians the same question and you get 10 different answers,” she told the New York Times. Adding a touch of bleak comedy to proceedings, it emerged that the warring experts were at the wrong end of a bad divorce.

It isn’t a comforting time for art historians. Weeks earlier, in January, the Museum of Fine Arts in Ghent, Belgium, was forced to pull 24 works supposedly by many of the same Russian artists – Kandinsky, Malevich, Rodcheko, Filonov – after the Art Newspaper published an exposé arguing they were all forged. Just days before, there was uproar when 21 paintings shown at a Modigliani exhibition in Genoa, Italy, were confiscated and labeled as fakes. Works that had been valued at millions of dollars were abruptly deemed worthless.

The market in old masters is also jittery after an alarming series of scandals – the greatest of which was last year’s revelation that paintings handled by the respected collector Giuliano Ruffini were suspect. A Cranach, a Parmigiano, and a Frans Hals were all found to be forged; institutions including the Louvre had been fooled. The auction house Sotheby’s was forced to refund $10m for the Hals alone. Many experts are now reluctant to offer an opinion, in case they’re sued – which, of course, only intensifies the problem.

Adding fuel to the fire is another development: Wary of being caught, more and more forgers are copying works from the early to mid-20th century. It’s much easier to acquire authentic materials, for one thing, and modern paintings have rocketed in value in recent years.

For many in the industry, it is starting to look like a crisis. Little wonder that galleries and auction houses, desperate to protect themselves, have gone CSI. X-ray fluorescence can detect paint and pigment type; infrared reflectography and Raman spectroscopy can peer into a work’s inner layers and detect whether its very component molecules are authentic. Testing the chemistry of a flake of paint less than a millimeter wide can disclose deep secrets about where and, crucially, when it was made.

What if the forger’s handwriting was staring you in the face, if only you could see it?

But what if you didn’t need to go to all that trouble? What if the forger’s handwriting was staring you in the face, if only you could see it? That’s the hope of researchers at Rutgers University in New Jersey, who have pioneered a method that promises to turn art authentication on its head.

***

Instead of subjecting works to lengthy and hugely expensive materials analysis, hoping a forger has made a tiny slip – a stray fiber, varnish made using ingredients that wouldn’t have been available in 16th-century Venice – the new technique is so powerful that it doesn’t even need access to the original work: A digital photograph will do. Even more striking, this method is aided by artificial intelligence. A technology whose previous contributions to art history have consisted of some bizarre sub–Salvador Dalís might soon be able to make the tweed-wearing art valuers look like amateurs.

At least that’s the theory, says Ahmed Elgammal, PhD, whose team at Rutgers has developed the new process, which was made public late last year. “It is still very much under development; we are working all the time. But we think it will be a hugely valuable addition to the arsenal.”

That theory is certainly intriguing. Instead of obsessing over materials, the new technique takes a hard look at the picture itself: Specifically, the thousands of tiny individual strokes that compose it.

Every single gesture – shape, curvature, the velocity with which a brush- or pencil-stroke is applied – reveals something about the artist who made it. Together, they form a telltale fingerprint. Analyze enough works and build up a database, and the idea is that you can find every artist’s fingerprint. Add in a work you’re unsure about, and you’ll be able to tell in minutes whether it’s really a Matisse or if it was completed in a garage in Los Angeles last week. You wouldn’t even need the whole work; an image of one brushstroke could give the game away.

“Strokes capture unintentional process,” explains Elgammal. “The artist is focused on composition, physical movement, brushes – all those things. But the stroke is the telltale sign.”

The original painting by Matisse titled Odalisque in Red Pants, left, next to a fake version that was on display at the Museum of Contemporary Art in Caracas, Venezuela. The original work was swapped with a forgery in 2002. Photograph: Uncredited/ASSOCIATED PRESS

The paper Elgammal and his colleagues published last November examined 300 authentic drawings by Picasso, Matisse, Egon Schiele, and a number of other artists and broke them down into more than 80,000 strokes. Machine-learning techniques refined the data set for each artist; forgers were then commissioned to produce a batch of fakes. To put the algorithm though its paces, the forgeries were fed into the system. When analyzing individual strokes, it was over 70% accurate; when whole drawings were examined, the success rate increased to over 80% . (The researchers claim 100% accuracy “in most settings.”)

The researchers are so confident that they included images of originals and fakes alongside each other in the published paper, daring so-called experts to make up their own minds. (Reader, I scored dismally.) One of Elgammal’s colleagues, Dutch painting conservator Milko den Leeuw, compares it to the way we recognize family members: They look similar, but we’re just not sure why. “Take identical twins,” he says. “Outsiders can’t separate them, but the parents can. How does that work? It’s the same with a work of art. Why do I recognize that this is a Picasso and that isn’t?”

The idea of fingerprinting artists via their strokes actually dates back to the 1950s and a technique developed by Dutch art historian Maurits Michel van Dantzig. Van Dantzig called his approach “pictology”, arguing that because every work of art is a product of the human hand, and every hand is different, it should be possible to identify authorship using these telltale strokes.

The problem, though, was that there was too much data. Even a simple drawing contains hundreds or even thousands of strokes, all of which needed to be examined by the human eye and catalogued. Multiply that by every work, and you see how impractical it was.

“It just wasn’t possible to test it,” says den Leeuw, who first became aware of pictology as a student. “I saw many attempts, but mostly it ended in ideas that would never be.”

But can AI now do what humans failed to, and give an art historian’s trained eye some sort of scientific basis? “Exactly,” says den Leeuw. “Very often it’s a gut feeling. We’re trying to unpick the mystery.”

Though Mass says she’s unlikely to throw out her fluorescence gun just yet, she admits to being impressed. “A lot of people in the field are excited by AI It’s not a magic bullet, but it’ll be another tool. And it’s really valuable when you’re dealing with a sophisticated forger who’s got everything else right – paint, paper, filler, all the materials.”

Can A​I​ now do what humans failed to, and give an art historian’s trained eye some sort of scientific basis?

***

There are issues. So far, the system has been tested mainly on drawings from a handful of artists and a brief time period. Paintings, which generally contain thousands more strokes, are a tougher challenge; older paintings, which might contain numerous layers of restoration or overpainting, are tougher still. “It’s challenging, but it doesn’t mean we can’t do it,” Elgammal says. “I’m confident.”

What about style, though, particularly where an artist changes over time? Think of Picasso’s wildly varying periods – blue, African, cubist, classical – or how in the 1920s Malevich abandoned the elemental abstraction of his black squares for figurative portraits that could almost have been painted by Cézanne (pressure from Stalin was partly responsible).

Another expert, Charles R Johnson, who teaches computational art history at Cornell, is less persuaded – not so much by the AI as by the assumptions that lie behind it. “A big problem is that strokes are rarely individualized,” he says. “Overlap is difficult to unravel. Plus, one must understand the artist’s style changes over their career in order to make a judgment.”

In addition, Johnson argues, many artist’s brushwork is essentially invisible, making it impossible to unpick; it might be better to focus computer analysis on assessing canvases or paper, which can be more rigorously verified. “I remain quite skeptical,” he says.

Elgammal and den Leeuw concede there’s a way to go. Currently they’re working on impressionist paintings – infinitely more complex than Schiele and Picasso line drawings – and hope to publish the results next year. Even with the drawings, the machine can’t yet be left to learn on its own; often the algorithms require human tweaking to make sure the right features are being examined. Artists whose output isn’t large enough to create a reliable data set are also a challenge.

I ask Elgammal if he’s worried about being sued. He laughs, slightly nervously. “That’s something I think about.”

It’s a reasonable question, particularly pressing given the number of fakes that are circulating: What if your database accidentally becomes contaminated? Many people argue that the art market is hopelessly corrupt – so much so that some economists doubt whether calling it a “market” is even fair. Could the algorithm become skewed and go rogue?

“It’s like any system,” Mass agrees. “Garbage in, garbage out.”

Does she think that’s a possibility? How many fakes are out there? “Put it this way,” Mass says, “when I go into auction houses – maybe not the big ones, but smaller, local ones – I think ‘buyer beware.’ It might be between 50 and 70% .”

Rival solutions are coming down the road. Some have proposed using blockchain technology to guarantee provenance – the history of who has owned a work. Others have called for much greater transparency. Everyone agrees that the system is broken; some kind of fix is urgent.

***

Of course, there are big philosophical questions here. When someone goes to the effort of finding exactly the right 17th-century canvas, dons an antique smock, and paints a near-flawless Franz Hals, it should perhaps make us reconsider what we mean by the words “real” or “fake”, let alone the title of “artist”. Yet the irony is inescapable. It is hard to think of something more human than art, the definition of our self-expression as a species. But when it comes down to it, humans aren’t actually that good at separating forged and authentic in a painting that has all the hallmarks of, say, a Caravaggio but is merely a stunt double. Relying on our eyes, we simply can’t tell one twin from the other. We might even ask: Why do we care?

Forget cars that pilot themselves or Alexa teaching herself to sound less like the robot she is – AI seems to understand the secrets of artistic genius better than we do ourselves.

When I speak to den Leeuw, I wonder if he also senses the irony: that, while machines might not yet might be able to make good art, they are getting eerily good at appreciating it. “Yes, it’s true,” he says thoughtfully. “When it comes to very complex combinations of things, humans are really not so good.” He laughs. “We make too many mistakes.”