Interactive explainer
The Bipartite
Configuration Model
A way of answering one question about any bipartite network: given only how many connections each node has, what pattern of links would we expect to see if the rest were left to chance? Whatever doesn't match that expectation is what's actually worth explaining.
01 · Overview
Bipartite networks, in one picture
A bipartite network has two kinds of nodes, and every connection runs between the two kinds, never within one. Users and the movies they watch are one example. Countries and the products they export are another. Below is a small example with seven users and eight movies, used throughout the rest of this page.
Each line is an observed link. The number next to a node is its degree: how many connections it has. Degree is the only thing BiCM is allowed to know about a node.
02 · The Model
Why you need a comparison case
In real bipartite data, some pairs of nodes share far more connections than others. Two users might have watched many of the same movies. But is that similarity meaningful, or is it simply what you'd expect from two people who both watch a lot of movies? To tell the difference, you need a comparison case: a version of the network that is as random as possible while still matching the one fact you trust, how many connections each node has.
The simplest network consistent with the data
BiCM starts from a simple idea: use only the information you actually have. In our example, that means how many movies each user watched and how many users watched each movie, nothing more. Many different networks could match those same counts. BiCM is the one among them that doesn't rely on any extra information about who specifically connects to whom. Statisticians call this choice maximizing entropy: picking the option that assumes as little as possible beyond the facts you started with. That's where the model's name comes from. Whatever the real network does beyond that is worth a closer look.
Working through the math shows that this leads to one specific formula for the probability of a link between row node $i$ and column node $a$:
$x_i$ and $y_a$ are numbers assigned to each node, usually called fitnesses. Call $k_i$ the observed degree of row node $i$ (how many columns it connects to) and $h_a$ the observed degree of column node $a$. The fitnesses are chosen so that summing the model's link probabilities reproduces those two numbers exactly:
There's no closed-form solution for these numbers. They're found with a short iterative calculation, a handful of alternating updates, and that calculation runs live in your browser every time you edit the matrix below.
Try the formula
Drag the two fitness values and watch the link probability, and the edge itself, respond.
03 · Playground
Fit BiCM to data, live
Click any cell to add or remove a link. Every change refits the model instantly. On the right, you'll see the probability BiCM assigns to every possible link, not just the observed ones, based only on the row and column degrees.
Observed network editable
Rows are users, columns are movies. Click a cell to toggle a link.
BiCM link probabilities fitted
Darker = the model considers this link more likely, given both degrees.
Observed vs. model-predicted links
Solid lines are real links. Faint dashed lines are links BiCM thinks are plausible (p > 0.5) even though they weren't observed.
04 · Statistical Validation
From bipartite links to a clear result
One common use of BiCM is projecting a bipartite network onto one side. For example, connecting two users whenever they share enough movies, while correcting for the fact that popular movies and very active users will share things purely by chance. Compare the naive projection, where any shared item counts, against the BiCM-validated one, where only overlaps larger than chance would predict count.
A z-score measures how far the observed overlap is from what chance would predict, in units of typical variation: 0 means exactly as expected, 2 means clearly above chance. The slider below sets how high that value must be before a pair counts as validated.
Naive projection noisy
An edge for every pair that shares at least one item.
BiCM-validated projection signal
An edge only where the overlap beats chance at your chosen threshold.
In production, you'd also apply a false-discovery-rate correction across all pairs before calling a link "significant". This page shows the raw z-score threshold instead, so the mechanism stays visible.
05 · Applications
Where BiCM shows up
Economic complexity
Countries and the products they export competitively. Validated links reveal which countries have genuinely similar production capabilities.
Ecology
Plants and the pollinators that visit them. Validated links separate true specialization from what you'd expect given how generalist each species already is.
Finance
Banks and the assets they hold. Validated links flag portfolio overlap between institutions that is larger than their size alone would predict, an indicator of systemic risk.
Recommendation
Users and the items they interact with, the toy example used on this page. Validated co-purchase or co-viewing links lead to recommendations that are less biased toward popular items.