--- license: cc-by-4.0 task_categories: - graph-ml tags: - graph-anomaly-detection - heterogeneous-graphs - non-adversarial-anomalies - billing-pipelines size_categories: - 10K Target | Count | |------|------------------|-------| | subscribes_to | customer -> contract | 389 | | has_sku | contract -> sku | 1,111 | | governs | pricing_rule -> sku | 1,111 | | applies_to | pricing_rule -> contract | 1,111 | | generates_usage | customer -> usage_record | 14,601 | | for_sku | usage_record -> sku | 14,601 | | rates_to | usage_record -> rated_charge | 14,601 | | priced_by | rated_charge -> pricing_rule | 14,601 | | billed_on | rated_charge -> line_item | 14,601 | | part_of | line_item -> invoice | 14,601 | | invoiced_to | invoice -> customer | 3,547 | | settles | payment -> invoice | 3,547 | | opens_ar | invoice -> ar_record | 3,547 | | posts_to | invoice -> gl_entry | 6,961 | | **Total** | | **108,930** | The homogeneous view doubles edge count by adding reverse edges. ## Anomaly Taxonomy Six anomaly types are organized into three graph-reasoning categories. The categorization is the analytical contribution of the benchmark: it makes the architectural success and failure modes of GNNs interpretable. | # | Name | Target Node | Category | Mechanism | |---|------|-------------|----------|-----------| | 1 | Missing Metering | customer | relational | Usage stops while contract remains active | | 2 | Orphaned Lines | line_item | relational | Invoice customer differs from charge customer (cross-path violation) | | 3 | Pricing Mismatch | rated_charge | structural | Charge amount inconsistent with volume x rate from connected pricing rule | | 4 | Stale Discount | pricing_rule | peer-comparison | Rate diverges from peer rules governing the same SKU | | 5 | Revenue Recognition | gl_entry | structural | Invoice missing the expected cash GL entry (sibling-count check) | | 6 | Premature AR | ar_record | structural | AR record closed despite incomplete payment sum | Labels are provided per node type as a binary `y` (0 = normal, 1 = anomalous) and as `anomaly_type` (0 = normal, 1-6 = the type above). Each node carries at most one anomaly label; no overlap between types. Injection signatures have been audited for feature leakage: per-type Cohen's d remains below 0.2, ensuring detection requires graph structure rather than feature shortcuts. ## Headline Result At injection rate 0.05 across 10 seeds, the V4 result table is: | Type | MLP | GCN | GAT | RGCN | HGT | Oracle | Best GNN | Gap | |------|-----|-----|-----|------|-----|--------|----------|-----| | Missing Metering | 0.512 | 0.730 | 0.398 | 0.784 | **0.827** | 0.866 | HGT | +0.038 | | Pricing Mismatch | 0.684 | 0.571 | 0.867 | **0.980** | 0.979 | 0.881 | RGCN | -0.099 | | Orphaned Lines | 0.505 | 0.967 | 0.968 | 0.922 | **0.988** | 1.000 | HGT | +0.012 | | **Stale Discount** | 0.560 | 0.571 | 0.476 | **0.591** | 0.540 | **0.965** | RGCN | **+0.374** | | Revenue Recognition | 0.509 | 0.965 | 0.928 | 0.497 | **0.987** | 1.000 | HGT | +0.013 | | Premature AR | 0.509 | 0.519 | 0.533 | **0.996** | 0.991 | 1.000 | RGCN | +0.004 | The 0.374 oracle-GNN gap on Stale Discount is an order of magnitude larger than any other gap. Because the gap is exposed by a hand-coded peer-comparison oracle that achieves 0.965 AUROC, the limitation is established as architectural — message-passing aggregation cannot represent peer-distribution comparison — rather than the task being ill-posed. ## Data Generation The dataset is fully synthetic. No real billing data was used at any stage. The generation pipeline is a configurable Python module with deterministic NumPy seeding. Default parameters: - Revenue distribution: lognormal contract sizes producing a Pareto-like tail - Usage volumes: log-normal (mu = 6.0, sigma = 1.2) - Customer arrivals: front-loaded declining Poisson - Contract durations: uniform 6-36 months - Pricing: uniform 0.01-10.0 base rate with +/-20% per-contract variation All parameters are documented in the configuration module of the released code. ## Train / Test Split - Dynamic entities (usage_record, rated_charge, invoice, line_item, payment, ar_record, gl_entry): temporal split. Months 1-18 -> train, months 19-24 -> test. - Static entities (customer, contract, sku, pricing_rule): deterministic 75/25 random split keyed off `(seed + stable_offset(node_type))`. The stable offset is an MD5-derived integer per node type name, ensuring split reproducibility across seeds and node types. ## Preprocessing - All features z-score normalized per column (mean 0, std 1) - Categorical features integer-encoded - No missing values; no NaN or Inf values (verified by automated integrity check) - No out-of-bounds edge indices (verified) ## Intended Uses - Benchmarking GNN methods for non-adversarial anomaly detection on heterogeneous temporal graphs - Evaluating which graph reasoning patterns (structural sibling counting, multi-hop relational path matching, relation-specific traversal, peer-distribution comparison) different architectures can or cannot represent - Diagnostic studies of message-passing limitations, including ablations against hand-coded oracle ceilings - Research on architectural extensions that close the peer-comparison gap ## Not-Intended Uses - Production billing system deployment. The synthetic distributions do not replicate the complexity of real billing data. - Training fraud detection models. The anomalies in BillSim are non-adversarial system errors, not adversarial attack patterns. Fraud involves intentional concealment and shifting tactics; billing errors do not. - Drawing conclusions about real-customer billing accuracy. The benchmark exists to evaluate model architectures, not to model any specific operator's billing platform. ## Format PyTorch Geometric `HeteroData` objects serialized as `.pt` files, accompanied by Python generation scripts that reproduce the dataset deterministically from any seed and injection rate. ## Licenses - Data: CC-BY-4.0 - Code: Apache-2.0 ## Citation Anonymous Authors. BillSim: A Synthetic Heterogeneous Graph Benchmark for Non-Adversarial Anomaly Detection in Usage-Based Billing. Submitted to NeurIPS 2026 Evaluations & Datasets Track, 2026.