ringkernel-accnet
GPU-accelerated accounting network analytics with real-time visualization.

Overview
AccNet transforms traditional double-entry bookkeeping into a graph representation, enabling advanced analytics powered by GPU compute. The application demonstrates RingKernel's capabilities for financial network analysis, fraud detection, and compliance monitoring.
Features
- Network Visualization: Interactive graph showing account relationships and money flows
- Fraud Detection: Circular flows, threshold clustering, Benford's Law violations
- GAAP Compliance: Automated detection of accounting rule violations
- Temporal Analysis: Seasonality, trends, behavioral anomalies
- Multi-backend: CPU and optional CUDA GPU acceleration
Architecture
┌─────────────────┐ ┌──────────────────┐ ┌────────────────┐
│ Data Fabric │────>│ GPU Kernels │────>│ Visualization │
│ (Synthetic Gen) │ │ (CUDA/WGSL) │ │ (egui Canvas) │
└─────────────────┘ └──────────────────┘ └────────────────┘
│ │ │
▼ ▼ ▼
┌─────────────────┐ ┌──────────────────┐ ┌────────────────┐
│ Journal Entries │ │ Network Analysis │ │ Graph Layout │
│ Transaction Gen │ │ Fraud Detection │ │ Flow Animation │
│ Anomaly Inject │ │ Temporal Analysis│ │ Analytics UI │
└─────────────────┘ └──────────────────┘ └────────────────┘
GPU Kernels
1. Suspense Detection
Identifies suspicious clearing accounts by analyzing balance patterns, risk scores, and flow imbalances.
// Each thread processes one account
2. GAAP Violation Detection
Checks for improper account pairings that violate Generally Accepted Accounting Principles.
// Each thread processes one flow
3. Benford Analysis
Statistical analysis of first-digit distribution to detect fabricated transactions.
// Each thread processes one amount
Fraud Pattern Types
| Pattern | Risk Weight | Description |
|---|---|---|
| CircularFlow | 0.95 | Money flowing in a circle: A → B → C → A |
| HighVelocity | 0.90 | Rapid multi-hop money movement |
| ThresholdClustering | 0.85 | Amounts clustered below approval threshold |
| StructuredTransactions | 0.85 | Split transactions to avoid detection |
| DormantActivation | 0.80 | Sudden activity on long-dormant accounts |
| UnusualPairing | 0.75 | Implausible account combinations |
| BenfordViolation | 0.70 | Amount distribution violates Benford's Law |
| SelfLoop | 0.65 | Bidirectional flow between accounts |
| AfterHoursEntry | 0.60 | Entry posted outside business hours |
Usage
use *;
// Create a network
let mut network = new;
// Add accounts
let cash = network.add_account;
// Add flows
network.add_flow;
// Run analysis
network.calculate_pagerank;
Run GUI
# CPU backend
# With CUDA GPU acceleration
Benchmark
Testing
License
Apache-2.0