Module network_generation

Module network_generation 

Source
Expand description

Accounting Network Generation Kernel.

This module implements GPU-accelerated transformation of double-entry bookkeeping journal entries into directed accounting networks (graphs). Based on the paper “Hardware Accelerated Method for Accounting Network Generation”.

§Key Concepts

  • Journal Entry: A balanced set of debit/credit line items (double-entry bookkeeping)
  • Accounting Flow: A directed edge representing value transfer between accounts
  • Accounting Network: The complete directed graph of all flows

§Solving Methods

The module implements five solving methods with decreasing confidence:

  • Method A (Confidence: 1.0): Trivial 1-to-1 mapping for 2-line entries
  • Method B (Confidence: 0.95): n-to-n bijective matching with Hungarian algorithm
  • Method C (Confidence: 0.85): n-to-m partition matching using integer partition
  • Method D (Confidence: 0.70): Aggregation for large entries
  • Method E (Confidence: 0.50): Decomposition for complex multi-entity entries

§GPU Acceleration

  • Batch processing of journal entries in parallel
  • Fixed-point arithmetic (128-bit) for exact decimal representation
  • CSR sparse matrix format for efficient network storage
  • Ring mode for streaming updates with temporal windowing

Structs§

AccountingFlow
An accounting flow (directed edge in the network).
AccountingNetwork
Complete accounting network.
AddEntryResponse
Response for adding an entry.
AddEntryRing
Ring message for adding a journal entry to the network.
ClassifiedLine
A line item classified as debit or credit.
EntryNetworkResult
Result of generating the accounting network for a single entry.
FixedPoint128
Fixed-point representation for exact decimal arithmetic. Uses 128 bits with 18 decimal places (1e18 scale factor). Supports values up to ~170 trillion with 18 decimal precision.
NetworkGeneration
Accounting Network Generation Kernel.
NetworkGenerationConfig
Configuration for network generation.
NetworkGenerationInput
Input for network generation batch processing.
NetworkGenerationOutput
Output from network generation batch processing.
NetworkGenerationRing
Stateful network generation kernel for Ring mode.
NetworkGenerationStats
Statistics for network generation.
NetworkStatsResponse
Response for network statistics.
NetworkStatsRing
Ring message for network statistics.
PatternMatcher
Pattern matcher for identifying transaction types.
QueryFlowsResponse
Response for flow query.
QueryFlowsRing
Ring message for querying network flows.
VatDetector
VAT detector for identifying tax components in journal entries.
VatPattern
Detected VAT pattern in a journal entry.
VatRate
Known VAT/GST rates by jurisdiction.

Enums§

AccountClass
Account class based on standard accounting conventions.
SolvingMethod
Solving method used to generate an accounting flow.
TransactionPattern
Common accounting transaction patterns.
VatJurisdiction
VAT jurisdiction.
VatRateType
VAT rate type.