In 2012, a linguist at the University of Southern California decoded a famous medieval manuscript written in a cypher, using software designed to translate remote languages, and based on algorithms that matched the frequency of unknown sounds with the frequency of word-use in known tongues. An Italian engineer might have located a long-lost painting by Leonardo da Vinci after shooting gamma rays through a fresco by Giorgio Vasari to reveal a hidden painting on a false wall behind it. By similar means, a copy of the Mona Lisa was found to contain identical alterations to the under-drawing as the original, demonstrating that it had been painted alongside it. Meanwhile, archaeologists are using satellite photographs to identify unexcavated sites in Egypt, map terrorist looting in the Middle East, and even locate a previously unknown Viking settlement in North America.

Each discovery relies on digital investigative techniques that complement traditional close-reading of artworks and artefacts. Each story is a dramatic quest with a ‘big reveal’ at its climax, and each has required that art history as we know it be rewritten.

Examining under-drawings via infrared spectroscopy is especially revealing. Most artists drew on their panel or canvas prior to painting, changing or finessing the positioning or numbers of figures, then painting only the final version of their design. The all-important under-drawing thus reveals the thought processes and conceptual development of an artist. The Museo del Prado in Madrid had, for many decades, what they thought was a decent copy of Leonardo’s Mona Lisa, but when the under-drawing was examined using infrared spectroscopy, it was found to be identical to the original. Had the painting been a copy, the copyist would simply have painted the finished version, and could not have known of the changes in composition that Leonardo executed prior to painting. The Prado version must therefore have been made, step by step, alongside the original, likely by one of Leonardo’s workshop assistants.

Art history is an inexact science, with an element of mysticism behind the theories of some its most prominent practitioners. Take Walter Benjamin: in The Work of Art in the Age of Mechanical Reproduction (1939), he argued that what makes certain authentic works of art great is that they contain an inexplicable ‘aura’. This inexplicability is part of what makes it wonderful. For all its cinematic eureka moments, the clinical precision of forensic testing is less romantic than traditional art-historical research, where scholars in tattered tweeds spend months thumbing brittle-paged archives in mouldy libraries under the insect hum of tubular lighting, looking closely with the naked eye, or perhaps a magnifying glass, and fleshing out the story behind the artwork with scraps of information culled from old documents. But since the late 1990s, with the ubiquity of inexpensive, high-quality digital photography, and universal access to images via the internet, the most dramatic breakthroughs have come through forensics. Call it ‘CSI: Art History.’

Hieronymus Bosch, best known for his imaginative depictions of Hell populated with playfully grotesque monsters, has been at the centre of art-historical controversy this year – the 500th anniversary of his death. After a sell-out exhibition at the Noordbrabants Museum, in the artist’s hometown of s’-Hertogenbosch, a new blockbuster exhibition at the Prado in Madrid took up the commemorative reins. The Noordbrabants exhibited 17 extant paintings, recognising that Bosch painted 24 in total, while the Prado now exhibits 24 extant Bosch paintings, recognising a total of 27. Both exhibitions claim to be definitive, featuring almost all of the very few extant works by Bosch. But they have also become rival exhibits, due to that numerical discrepancy – the result of digital discoveries, first revealed at the Noordbrabants show, that have divided scholars and rankled storied institutions.

Using infrared spectroscopy to reveal what looks like a ghostly photographic negative of the surface image, the Dutch research team found that three works previously thought to have been independently painted (The Wayfarer, The Haywain and The Path of Life) were actually part of a single work, now called The Haywain Triptych, which had been dismembered at some point and its constituent panels sold separately. Spanish scholars continue to list these works as separate (though the opinions of many have been swayed by the convincing papers published by the Dutch on the reunification of this altarpiece).

Attributing an artwork to a specific artist’s hand has always been difficult. Artists did not regularly sign their works until the 19th century, and attribution based on a work’s style – the way it looks to the trained eye – leaves room for error, inadvertent and otherwise. Part of what makes Bosch precious is how limited an oeuvre survived: there might be more works by his hand that have been mislaid or misattributed: since artists always worked in studios or workshops, students and apprentices would develop a style very similar to that of their master. Then again, later artists learned by copying past masters, sometimes so well that it’s hard to tell the difference. Art historians do their best to match up written records of the production of paintings with the paintings themselves, but often the matches are imperfect. And attributions can change, especially when new forensic discoveries come to light.

In the case of the Bosch discoveries, excitement has been followed by rancour, since the Dutch researchers found evidence that led them to downgrade the attribution of certain works. Extracting the Stone of Madness, which was originally going to be loaned by the Prado to the Noordbrabants, is listed as ‘by Bosch’ on the loan agreement, and considered by the Spanish to have been painted between 1501 and 1505. But the view of the Dutch changed between the loan request and the exhibition. They informed the Prado that they would be listing the painting as ‘by the workshop or a follower of Bosch’, and dating it 1500-1520 (Bosch died in 1516). The Prado was unimpressed. As the museum’s deputy director Miguel Falomir told The Art Newspaper in May: ‘It is unacceptable to request a painting as a Bosch and then show it as something different.’

Downgrading a work strips it of cachet and value. Though it’s still of aesthetic and historical interest, it is no longer a drawcard; and, in financial terms, it converts a seven-to-eight-figure value to a six-figure one. This wasn’t the only problem. The Dutch also downgraded another Bosch from the Prado, The Temptation of St Anthony, which depicts the saint beset by monsters, and where the under-drawing appears to show a monster uncharacteristically smiling. Bosch’s monsters do not smile.

One of the beautiful but frustrating things about art history is that it can never be an exact science. Whatever forensic examination becomes available must be interpreted by human beings. Just as the introduction of DNA evidence has permitted huge strides forward in criminal investigations, but has not proven definitive in courtrooms, so too, digital art-historical discoveries have offered ‘eureka moments’ that have led to duelling opinions rather than resolutions. The Bosch controversy is a case in point, with Spanish scholars finding counterarguments for the different under-drawings in The Temptation of St Anthony. They claim that the painting was executed in a different style because Bosch was painting for a new patron.

And that smiling monster? Perhaps he was just licking his lips with glee before taking a bite out of the saint. The evidence is there, but it’s up to us how we interpret it.