Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
From Dating to Vector Search – “Stable Marriages” on a Global Scale (ashvardanian.com)
36 points by vov_or on July 18, 2023 | hide | past | favorite | 31 comments


It may also be worth pointing out that, for any given person, with a pool of one billion eligible partners, there is likely to be on the order of one to ten million "perfect" partners, i.e. partners with whom one would be potentially able to form a stable, happy marriage. Per xkcd's blog post on the subject: https://what-if.xkcd.com/9/

This is not to detract from the utility of the algorithm per se; rather, its relevance in pairing up partners in a dating app. I'd have to guess that factors like physical proximity, speaking the same language, being in roughly the same age range, having the same political views, etc. can be used to straightforwardly narrow down the eligible pool for each user to about a thousand or so, at which point the algorithm the author describes as trivial is sufficient.

Also:

> With 1 Billion candidates for every person, you’d need 8 Million Terabytes of RAM to start with the classic algorithm. Multiply that by $10'000 per Terabyte of RAM, and you get a jaw-dropping $80 Billion. Practically infeasible and exorbitantly expensive.

Maybe I'm just missing something, and if so I'd love to be corrected, but I feel like if you had 2 billion users on your app, operating costs of $80 billion would not be out of the question.


In practice, a lot of people are just not compatible with anyone


On the second paragraph: That’s exactly how it worked originally. You can create composite embeddings, and then define some hybrid similarity measure to compute both physical proximity, sentiment of writing, and some categorical tags.

Coding it and experimenting with metrics, however, was much harder then. There was no Numba and I had to implement every experiment in C++, without JIT-ing: https://github.com/unum-cloud/usearch/releases/tag/v0.19.0


The problem space is much smaller than 1b. I’d be surprised if it was much larger than 10k when controlled for practical factors like proximity age etc.


On the last point: Somehow I haven’t even considered that :) Still, that’s just the RAM cost. The overall cluster would be much more expensive.


EDIT: On a second readthrough I realize I was misunderstanding the focus of the article, but can't seem to delete the comment yet. So ignore my inane ranting.

PS Can't figure out stirkethrough so I'm just nuking the comment.


Life is also more stable in a prison.

Individualism gives you the freedom to fail along with the freedom to succeed. It's a trade-off with being able to make your decisions.

I'd be more interested in not comparing the fail cases of western dating with arranged marriages but comparing the success cases against arranged marriages. Finding someone who truly feels like your missing half has got to be one of life's greatest pleasures. And the freedom to look for it and the freedom to fail sounds about 1000x better to me than "hanging in there" with a spouse my dad chose.

Every time I hear someone talk about it, the upsides of arranged marriage always kinda sound like "Sweetie, wouldn't it be much nicer to just stay inside where it's safe instead of going out into that dangerous world?"


We're primed to find clever second-order effects to justify grinding through unpleasantness. But sometimes things can just be nice: you don't like living with someone, so you don't, so you are happier.

> Yes there are exceptions, yes abuse and infidelity are justification often, no being pedantic in order to do a "gotcha" are not helpful.

Whether this is pedantry depends entirely on the proportions. Some studies suggest around a quarter of wives are abused. If that's the case then maybe divorce isn't high enough, and it's certainly a key consideration here and not a pedantic tangent. I don't know the area well enough to argue that either way, but I know enough to say you're being too dismissive of the question.


Great points. I am from country where arranged marriages are norm. In last 2 decade or so divorce rates rising. And one reason I see is indulgent attitude. So things have to be beautiful, happy, awesome and so on. Older attitude of just being in a average relationship is no acceptable to lot of people. I see this incessant indulgence heavily promoted by media, movies, TV etc.


How does that work after the divorce? Do you get into another arranged marriage? Or are you free to pursue whoever you wish after you've had your first arranged marriage?


Yes, another arranged marriage possible for both partners. Also as you say first failed marriage help get more permissive attitude from family/society towards 'dating first' marriages.


> countries with the most stable marriages tend to be ones in which arranged marriages are much more common

These also happen to be countries where women have terrible economic prospects and divorcees are treated as social outcasts. I happen to live in such a country and from what I can tell, people in miserable marriages stay married because of external pressures.

I can only imagine people glorifying such an arrangement are either ignorant of the ground reality or are outright deranged.


It’s the same as “wet streets cause rain” which if you say to people, they immediately object and then proceed to make the equivalent logical flaw moments later.


Author here :)

Not sure if it's related to the topic of the post. Even though I've originally used the algorithm for dating, its primary purpose is basic 1-to-1 matching of two sets.


What are some good applications of this algorithm?


Implementing a database for unstructured content seems like the most obvious one.


Indeed, and we’re seeing the downsides of easily-dissolved marriages. Many people would have been better if they felt they couldn’t abandon their marriage, and either had to work on communication, work on themselves, or just get through a rough patch. Just doing what you “want” often just equates to “making a hedonistic decision based around short-term pleasure.” Not always, of course, but it happens often enough that it’s a meaningful pattern. I’m sure there are people who can rightfully state that theirs lives would have been worse if they could not have left their bad marriages. I’m not disagreeing with this in principle, just stating that the inverse problem exists as well.


> Indeed, and we’re seeing the downsides of easily-dissolved marriages

I disagree; easily dissolved marriages just changes the manifestation of the downsides of easily entered marriages from deep and serious problems within marriages to overt failure of marriages.

Both problems are significantly reduced by premarital compatibility counseling.


rather than pile on the individual traits in this -- I tend to agree this is happening in America -- perhaps the constructive analysis is to notice what is missing.. that is, social context, responsibilities over time outside of personal goals, lineage and continuity, tradition, even acknowledging greater forces in life than one's self at all..

economics is part of this, but we have plenty of economic activity and yet alot of dismal outcomes.. so economics does not explain all of it


The article is nothing to do with marriage beyond the use of the term to explore a concept in matching.

It's like seeing a link to a paper on the Travelling Salesman problem and having it derailed to discussing dodgy car dealers instead.


This seems completely unrelated to the post and you just going off on a social soapbox. And your thesis is as insightful as observing that military employees quit less often than civilian employees, because no shit, in the former case you'll get arrested and prosecuted for desertion if you quit. It's trivial to enforce social stability by legal means or family-induced forced conformity, but societies and cultures differ on how much they value social stability versus freedom of individual self-determination.


I think societies with arranged marriage tend to be also more patriarchal, were divorce is looked down upon. At least where I am from, we used to be like that 40years ago (my father's oldest siblings were in arranged marriages). Women back then did not have the social liberty to ask for a divorce. A lot of my aunts (and their female friends) were trapped in unwanted (and miserble) marriages, and were conditioned to accept their misery and not to seek a divorce


Arranged marriages lead to more stability but do they lead to more happiness?

There’s an argument to be made that perhaps it does. But I don’t think its as clear cut. Western societies are generally more liberal and give more importance to individual happiness over group stability and I don’t think that’s a bad tradeoff.


To me stability is kind of happiness. But as I understand in west more excitement ,fun, adventure elements count towards happiness. Whereas for me a kind of boring content feeling is being happy.

One simple explanation could just be western societies are much richer and lot of material things and experiences can be had at an individual level whereas in other parts of the world, the best one can dream is group affordability.


In Japan, there was a long-standing tradition called "Miai," which can be seen as a form of matchmaking, although it wasn't precisely an arranged marriage. While individuals were not forced to marry, they were expected to consider the potential matches suggested to them. Although this custom is considered antiquated and has largely disappeared, it served as a safety net for individuals who may not have had the opportunity to meet their potential partners otherwise.


Could not agree more. We should be caring less about the survival rate of marriages and more about the total quantity of happiness experienced. Relationships are fluid, and a means to an end (support, fulfillment, opportunities for happiness, etc).


What is your measure of stability? If its divorce rates then yeah countries where divorce is harder have lower rates of divorce.

The obvious conclusion is just ban all divorces and now we have perfectly stable marriages.


Good observation.

I believe Duty and Obligation are in deep decline in the west.

Exhibit 1: Doctors being told that they can take time off from hospitals "to cope with the attack on X (x = current police brutality victim, unfortunate bystander, or neighbor dispute gone wrong)" , instead of doctors treating dying patients in ER, helping patients cope with pain in ICU, etc.

Exhibit 2: Cops failing to actively protect citizens and prevent crime (during protests, for example) because authorities have made it clear they will get sued/fired/lynched/prosecuted for doing so, and they are afraid to go against the system that pays them.

Exhibit 3: Same as (2) , but teachers in public school doing nothing to protect bullied kids

Exhibit 4: US military in forever conflicts causing an all-time low in voluntary army recruit numbers.

This is the west today. We reap what we sow.


You get the systems you build. If you underpay people, don’t respect them, and don’t provide them with authority (teachers specifically from your example), they will check out or leave professions entirely. People have options.

See: shortages of everyone you mentioned. They owe us nothing, we owe them if we want the system to work.

> I believe Duty and Obligation are in deep decline in the west.

This sounds like collective entitlement. You don’t sacrifice when you’re not valued. That’s just exploitation.


Great example of my point.

I didnt build this. Neither did you.

But here is a certainty, if you individually play out this line of thinking in the aggregate, it sums up to "i dont care if it is not to my benefit" as a society.

This line of thinking is THE problem. This decadence is new and its accelerating.

Duty is doing the right thing regardless of how hard it is or whether it benefits oneself. Thats a basic show of respect.

How much you would propose to pay doctors on top of what they are already paid since they are 'underpaid'.

?

How much do you think the founding fathers were paid ? What amount you think it made them feel "valued" so much so that they were ok to potentially, lose their houses, farms, and get their family killed for their work

?


marriages should probably be replaced with a license to have children, with a separate license / registration for each child.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: