Implementation:7onez Cti expert Hypothesize Build Clusters
| Knowledge Sources | |
|---|---|
| Domains | OSINT, Attribution, Graph_Theory |
| Last Updated | 2026-10-28 14:00 GMT |
Overview
Concrete tool for partitioning domains into same-operator clusters via union-find over attribution-grade shared indicators, provided by the cti-expert KB falsification scaffold.
Description
The build_clusters function in hypothesize.py uses a union-find data structure to merge domains that share attribution-grade indicators. The key insight is that only discriminating indicators drive the union: a proxy/registrar email, or any indicator linked to more than max_fanout domains, is shared infrastructure (a reseller, a CDN, an ad network) — clustering on it chains unrelated groups into one giant false operator. Broad indicators are dropped (reported via --show-dropped).
Service tokens (analytics/verification) get a tighter cap (service_fanout) than identity artifacts (registrant/wallet) because a service token on many domains is agency-shared, not one operator. Only attribution-grade identity artifacts merge clusters (same-operator, not same-kit). Corroborating artifacts are reported but never merge.
The emit function renders the clusters as a falsification board: HYPOTHESIS, CONFIDENCE, DISCONFIRM checks, and OPEN QUESTIONS per cluster.
Usage
Import this when you need to:
- Partition a KB into same-operator candidate clusters.
- Generate falsifiable attribution hypotheses with confidence levels.
- Distinguish attribution-grade artifacts (registrant, wallet) from same-kit artifacts (template, analytics).
- Produce disconfirmation checks that try to break each cluster.
Code Reference
Source Location
- Repository: cti-expert
- File: intel_engine/tools/kb/hypothesize.py
- Lines: L137-179 (build_clusters), L238-260 (emit)
Signature
def build_clusters(kb, min_domains, max_fanout=40, service_fanout=15):
"""Union-find domains that share any >=min_domains indicator. Returns clusters
+ their bindings. Only *discriminating* indicators drive the union."""
def emit(clusters, top):
"""Print clusters as falsification boards (HYPOTHESIS, CONFIDENCE, DISCONFIRM,
QUESTIONS), sorted by attribution strength."""
Import
from hypothesize import build_clusters, emit
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| kb | KB | Yes | Knowledge base instance |
| min_domains | int | Yes | Minimum shared-indicator threshold |
| max_fanout | int | No | Max domains per identity indicator (default 40) |
| service_fanout | int | No /// Max domains per service token (default 15) |
Outputs
| Name | Type | Description |
|---|---|---|
| clusters | list | [{domains, bindings}] — union-find groups with binding indicators |
| dropped | list | Indicators dropped as shared infrastructure |
Usage Examples
Build and Emit Clusters
from knowledge_base import KB
from hypothesize import build_clusters, emit
kb = KB("intel_engine/knowledge")
clusters, dropped = build_clusters(kb, min_domains=2, max_fanout=40)
emit(clusters, top=8)
# Prints falsification boards for top 8 clusters
Service Token Tighter Cap
# Analytics IDs get a tighter fanout cap than registrant emails
clusters, dropped = build_clusters(
kb,
min_domains=2,
max_fanout=40, # identity artifacts
service_fanout=15, # analytics/verification tokens
)
print(f"{len(dropped)} indicators dropped as shared infrastructure")
Related Pages
Implements Principle
- Principle:7onez_Cti_expert_Same_Operator_Clustering
- Principle:7onez_Cti_expert_Collecting_Not_Attributing