TL;DR
The Two-Ledger Model bridges the gap between aggregated AI billing and granular business transactions by joining a "settlement ledger" (standardized billing data) with an "attribution ledger" (runtime telemetry). This approach allows enterprises to calculate the exact AI cost of a specific order or claim, identify "shadow AI" spend, and use predictive gating to slash the costs of runaway agentic loops by over 60%.
What Problem Does This Paper Address?
As enterprises deploy complex, multi-agent AI systems, they face a "grain mismatch" problem. Finance departments receive AI invoices at the settlement grain—monthly totals aggregated by provider and SKU. However, business leaders need to understand costs at the transaction grain—for example, "How much did AI contribute to the cost of processing Order #48812?"
Because AI providers (like AWS, Azure, or OpenAI) cannot see internal enterprise transaction boundaries, their billing data lacks the context needed for unit economics. Existing standards like FOCUS (for billing) and OpenTelemetry (for runtime traces) are necessary but insufficient on their own: billing data lacks transaction IDs, while telemetry lacks pricing and invoice reconciliation.
Methods
The paper proposes the Two-Ledger Model, an architectural framework that maintains two distinct datasets joined by a novel Correlation Spine:
- Settlement Ledger: A lake of billing data normalized to the FOCUS standard. This is the "source of truth" for what was actually paid.
- Attribution Ledger: A runtime record of every model invocation, priced in near-real-time using a versioned Rate Card. It captures token counts and metadata using OpenTelemetry GenAI conventions.
The Correlation Spine is the "glue" that assigns model calls to business transactions across four layers of decreasing certainty:
- L1: W3C Trace Context (direct technical propagation).
- L2: Protocol metadata (A2A/MCP headers).
- L3: Business-key correlation (matching order numbers or case IDs).
- L4: Probabilistic matching (using timing and workload fingerprints as a last resort).
Datasets
The authors evaluated the model using a synthetic simulation study because no public datasets currently combine multi-cloud AI billing with internal enterprise transaction logs.
- Generator: Produced 20,000 business transactions (Order-to-Cash, Procure-to-Pay, etc.).
- Scale: Resulted in 109,792 model invocations across seven systems of record and three cloud providers.
- Ground Truth: Every record carried its true business transaction ID, allowing for precise measurement of correlation accuracy and reconciliation recovery.
Key Insights and Ideas
- Shadow AI Detection: By subtracting the attributed cost from the total bill, the model produces a "reconciliation residual." This residual identifies exactly how much AI spend is happening outside of sanctioned, metered paths.
- Agentic Cost Metrics: The paper introduces three new metrics for multi-agent systems:
- Token Efficiency (TE): Ratio of final output tokens to total tokens consumed.
- Coordination Overhead (CO): The cost of agents planning and talking to each other vs. doing productive work.
- Rework Cost (RW): The cost of failed or retried steps.
- Mid-Flight Gating: By using a forecaster to estimate the total cost of a transaction while it is still running, the system can "pause" or terminate transactions that are likely to exceed their budget (e.g., an agent stuck in a runaway loop).
Key Results
- Correlation Coverage: The layered spine maintained >99% cost coverage even when standard trace propagation fell to zero.
- Reconciliation Accuracy: The model recovered "planted" unmetered spend (shadow AI) within 0.24 percentage points of the actual bill.
- Cost Control: Mid-flight gating reduced the p99 transaction cost by 61% and total spend by 9.3%, while only pausing ~4% of transactions that would have finished within budget.
- Billing Error Detection: The two-sided reconciliation successfully flagged provider overbilling errors at the exact planted amounts.
Limitations and Future Work
- Simulation vs. Reality: The results are based on synthetic data. A real-world field pilot is needed to measure actual correlation precision and "collision rates" of business keys in production environments.
- Standards Maturity: The model relies on FOCUS 1.5 and OpenTelemetry GenAI conventions, both of which were in development or pre-ratification at the time of writing.
- Overhead Costs: The paper does not deeply explore the transaction-amortized costs of fine-tuning, embedding refreshes, or vector database storage, focusing primarily on inference.
- L4 Benchmarking: Further work is required to benchmark the accuracy of the probabilistic matching layer (L4) across different types of enterprise workloads.
Summary updated