The title is a quote by the manga artist Masashi Kishimoto. It is one of many quotes linking insanity and genius, one of them dating all the way back to Aristotle. But now, finally, we can quantify how similar insanity and madness, it is: 0.5810. This may not look that high but insanity is closer to madness than sanity, sanity and madness only have a similarity of 0.4114.
You may be asking: How can I quantify the similarity between insanity and madness? Easy, I do it just as Large Language Models (LLMs) such as ChatGPT, Google’s Gemini etc do. Under the bonnet these text generating machines, deal only in numbers, so they need to assign numbers to everything, including to both “insanity” and “madness”. LLMs also need to know if two words or two pieces of text have similar meanings,or very different meanings. So they also need a way to quantify how similar two words or two phrases are.
I used spacy – a Python library for natural language processing* – to convert the word “insanity” into numbers, specifically a vector of 300 numbers:
while “madness” is
and then the standard way (I have recently learnt) to assess similarity is just the cosine of the angle between these two 300-dimensional vectors. This is equivalent to taking the dot product between the two vectors and dividing by the product of their magnitudes.
So at last we have come up with a way to quantify similarity. We had to, computers deal only in things we can put a number on. I don’t know whether this has brought us as humans closer to understanding how similar/different insanity and madness, although we can now always ask an LLM.
* Specifically I used spacy’s “en_core_web_md” model. Incidentally, for a pair of synonyms like “big” and “large” the similarity score is 1.000. LLMs use analogous but not identical versions of what are, I think, often called vector embeddings.