In the 1950s, the influential British psychologist and psychiatrist John Bowlby observed the lifelong impact of the earliest bonds formed in life, between children and parents, or primary caregivers: attachment theory, which has been widely researched and drawn upon since then. Anxieties, hurts and negative patterns of thought arise from clinging to a fixed self or identity, which, by its very nature, is fluid and impermanent.
There are three major styles of attachment: secure, anxious and avoidant.
When Levine came across attachment theory as a student, no one seemed to have applied it to adult romantic relationships but he immediately saw the relevance to his own heartbreak. His boyfriend had an avoidant attachment style.
It was a revelation to Levine; now he knew why their relationship hadn't worked. "It didn't make it less painful, but I could understand it better. I was surprised that no one had taken those concepts and translated them into something that people could use."
For 15 years, he has been doing just that, at Columbia, in private practice, and as an author. With his friend and fellow psychologist Rachel Heller, Levine wrote Attached, a practical guide to harnessing adult attachment theory to find lasting love, described by its authors as "the manual we wish we'd had when we were dating". The idea is that by recognising your type you can identify a suitable partner, be more conscious in your relationships and stop self-sabotaging.
"It's not you, it's my attachment style," may sound like a gift for commitment-phobes, but the response to Attached suggests it has really helped people, says Levine. First published in 2010, the book has been updated to include stories from readers who found it "a profound relief to discover that their needs for closeness are valid".
There is an assumption that everyone has the "capacity to love in the same way", says Levine, but our attachment styles act like programming: "It goes much deeper than communication - it affects our perception of the world, without us really knowing it."
A person's attachment style is largely influenced by whether or not they bonded successfully with their primary caregivers - parents or otherwise - in childhood, though more recent research suggests that genes, and our romantic history as adults, may also be influential factors. Analysis of studies in North America and Europe found that roughly 25% of the population are avoidant, and 20% are anxious.
Anxiously attached people tend to be overly preoccupied with their partners and whether they love them back, while avoidants equate intimacy with a loss of independence and deploy distancing strategies.
Learning about which style they are can change people's lives, says Levine: "They are stopped from doing the same thing that hasn't worked for them."
You are not necessarily stuck with your style: according to a four-year study, one in four people do change over time - often as a result of a relationship with someone who has a secure attachment style.
"Secures" are comfortable giving and receiving love, and gravitate towards partners with the capacity to make them happy. As such, they can happily partner with anxious and avoidant types, and even have a steadying effect on them. "Secure people make you realise there is no threat," says Levine. He singles out Steve the bartender's steady pursuit of avoidant Miranda in the HBO television show Sex and the City as the behaviour of an archetypal secure (sometimes he even shows his patients clips from the show). The challenge for those looking for love is that, even though secures make up 55% the population, relatively few are single - they are just too good at being in a relationship.
Anxious and avoidant types are drawn to each other, despite their incompatible styles: as the person seeking closeness works harder to get it, their avoidant partner pulls away, thus reaffirming their separate beliefs that relationships are unfulfilling or restrictive. Levine's pop culture example is the film 500 Days of Summer, with Zooey Deschanel's Manic Pixie Dream Girl character a textbook avoidant.
People in anxious-avoidant relationships can change their behaviour with introspection and, often, therapy. Cate Mackenzie, a London-based psychosexual therapist, cites American couples therapist Hedy Schleifer's turtle-and-octopus theory, in which one is inclined to retreat, the other to reach out. Mackenzie says anxious octopuses can be overly critical of avoidant turtles, who may have internalised shame about avoidance. Her aim is to soften their exchange, by encouraging both partners to open up and better understand each other, "to build a new paradigm".
But, she adds: "Even if one person was more of a turtle in another relationship, it can change - the person with the higher desire becomes the octopus."
Dr Rob Weisskirch, professor of human development at California State University, says attachment theory is a useful tool for understanding nuance in relationships, but it's also possible to overestimate its importance. It doesn't necessarily mean you are destined to have bad relationships.
"There are plenty of external experiences that can be additive for healthy relationships," he says. In other words, nothing is set in stone.
Attached is mostly geared towards helping people who are still floundering in the dating pool - particularly anxious types, who are more vulnerable. Avoidants are relatively glossed over, Levine admits. "We never thought they were going to read this," he says. Nevertheless, this avoidant found it an illuminating read.
Levine's dating advice is to be upfront about your needs as predetermined by your type, and to try to identify your potential partner's type. For example, if you recognise that your anxious attachment style means it is important to you that your partner texts back quickly, make it clear early on. How they respond to a relatively low-stakes request will give you a clue to their own triggers.
People tend to go with the flow and find out over time, but that initial stage is crucial, says Levine. "When it's left up to chance, you're lucky if you find someone who is nourishing and helpful - if you're unlucky, you don't. It's important to be able to ask for what you need."
The "spark" that guides many people's decisions doesn't necessarily indicate long-term compatibility, he says. "And once you start to like the person, and make them special and unique to you, it's hard to undo it."
The premium placed on a securely attached partner can create its own pressures. Avoidants often distract from promising romantic prospects by fantasising about "the one", while Mackenzie warns that "high-achieving octopuses", in particular, can become overly preoccupied with a checklist of traits.
Levine is sympathetic to anyone who is struggling to find a partner. "When we are in a relationship we tend to forget how hard it is to be alone, to hope to find someone, to go out on yet another date. Even if you're the one who is rejecting, dating is a very stressful time."
He and Heller make it clear that our choice of partner powerfully affects our ability to thrive in the world - and that being clear-eyed about your needs in a relationship, and what would make you happy, is the first step towards success.