In order to group tabs by some sort of heuristics, you could look into graph technology: node proximity might be a good measure. What do I mean by that? Well, the tabs that somehow belong together are usually those opened during a research session so most of them will maybe be opened from the same google search: they have the google search in their history in common. Or I jump to another page — then that would also have common history with one of the other tabs. You could also add a bayesian text abstraction vector to a node: profile the site content and compare it with the other open sites. If they match is above a threshhold, they probably belong to the same group.
Just my two cents.