CoIn: Co unting the In visible Reasoning Tokens in Commercial Opaque LLM APIs

Guoheng Sun, Ziyao Wang, Bowei Tian, Meng Liu, Zheyu Shen, Shwai He, Yexiao He, Wanghao Ye, Yiting Wang, Ang Li · 2025

Read CoIn: Co unting the In visible Reasoning Tokens in Commercial Opaque LLM APIs by Guoheng Sun, Ziyao Wang, Bowei Tian, Meng Liu, Zheyu Shen, Shwai He, Yexiao He, Wanghao Ye, Yiting Wang, Ang Li (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-13778.txt.

Introduction

Guoheng Sun, Ziyao Wang, and their co-authors tackle a billing trust problem in commercial AI services. Their 2025 paper explains that top language models now reason in hidden steps before answering. Providers hide those steps, show only the final answer, and charge for the unseen tokens, which often form most of the bill.

Users have no way to check the count, and a provider could pad it with cheap fake tokens. Their framework, CoIn, audits both the count and the sense of hidden tokens. A hash tree built from token fingerprints verifies how many tokens ran. A matching step checks that the hidden steps stay relevant to the task. The work aims to make opaque AI services accountable for what they charge.

Catalog record

CREATORGuoheng Sun, Ziyao Wang, Bowei Tian, Meng Liu, Zheyu Shen, Shwai He, Yexiao He, Wanghao Ye, Yiting Wang, Ang Li
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE50 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2505-13778

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

CoIn: Co unting the In visible Reasoning Tokens in Commercial Opaque LLM APIs Guoheng Sun, Ziyao Wang, Bowei Tian, Meng Liu, Zheyu Shen, Shwai He, Yexiao He, Wanghao Ye, Yiting Wang, Ang Li Abstract As post-training techniques evolve, large language models (LLMs) are increasingly augmented with structured multi-step reasoning abilities, often optimized through reinforcement learning. These reasoning-enhanced models outperform standard LLMs on complex tasks and now underpin many commercial LLM APIs. However, to protect proprietary behavior and reduce verbosity, providers typically conceal the reasoning traces while returning only the final answer. This opacity introduces a critical transparency gap: users are billed for invisible reasoning tokens, which often account for the majority of the cost, yet have no means to verify their authenticity. This opens the door to token count inflation , where providers may overreport token usage or inject synthetic, low-effort tokens to inflate charges. To address this issue, we propose CoIn , a verification framework that audits both the quantity and semantic validity of hidden tokens. CoIn constructs a verifiable hash tree from token embedding fingerprints to check token counts, and uses embedding-based relevance matching to detect fabricated reasoning content. Experiments demonstrate that CoIn , when deployed as a trusted third-party auditor, can effectively detect token count inflation with a success rate reaching up to 94.7%, showing the strong ability to restore billing transparency in opaque LLM services. The dataset and code are available at https://github.com/CASE-Lab-UMD/LLM-Auditing-CoIn . 1 Introduction Large language models (LLMs) have achieved significant advances in recent years. Yet, as pretraining begins to saturate available data resources Zoph et al. 2020 , the research community has increasingly turned to inference-time innovations Hu et al. 2023 ; Kumar et al. 2025 . Among these, reinforcement learning (RL)-optimized reasoning models have shown promise by generating longer, structured reasoning traces that improve performance, particularly in tasks involving mathematics and code Guo et al. 2025 ; Muennighoff et al. 2025 . Such models, exemplified by DeepSeek-R1 Guo et al. 2025 and ChatGPT-O1 Jaech et al. 2024 , demonstrate that scaling at inference time can yield new capabilities without further pretraining. With this shift, providers like OpenAI increasingly adopt new service models. Reasoning traces, while critical for quality, are often verbose, sometimes speculative Jin et al. 2024 ; Zhang et al. 2025 , and may reveal internal behaviors vulnerable to distillation Gou et al. 2021 ; Sreenivas et al. 2024 . To protect proprietary methods and streamline outputs, commercial APIs typically suppress these intermediate steps, exposing only the final answer. However, users are still charged for all generated tokens, including those hidden from view. We refer to such services as Commercial Opaque LLM APIs (COLA) —proprietary, pay-per-token APIs that conceal both intermediate text and logits. This design introduces a critical vulnerability: users have no means to verify token usage or detect overbilling. Because reasoning tokens often outnumber answer tokens by more than an order of magnitude (Figure 1 ), this invisibility allows providers to misreport token counts or inject low-cost, fabricated reasoning tokens to artificially inflate token counts . We refer to this practice as token count inflation . For instance, a single high-efficiency ARC-AGI run by OpenAI’s o3 model consumed 111 million tokens, costing $66,772. 1 1 1 https://arcprize.org/blog/oai-o3-pub-breakthrough Given this scale, even small manipulations can lead to substantial financial impact. Such information asymmetry allows AI companies to significantly overcharge users, thereby undermining their interests. To tackle this problem, we design CoIn (Counting the Invisible) , a verification framework that enables third-party auditing of invisible reasoning tokens in COLA services. CoIn ensures billing accountability by enabling users to validate token counts reported by the commercial provider, while preserving the confidentiality of hidden content and maintaining protection against distillation. CoIn consists of two key components: (1) Token Quantity Verification , which leverages a verifiable hash tree Merkle 1987 to store fingerprint embeddings of reasoning tokens. Upon an audit request, CoIn allow users to query a small subset of the token fingerprints in the hash tree to verify the number of invisible tokens, avoiding accessing the actual reasoning tokens; and (2) Semantic Validity Verification , which detects fabricated, irrelevant, or low-effort token injection via a semantic relevance matching head. This matching head takes the embeddings of both the reasoning tokens and the answer tokens as input, and outputs a relevance score indicating their semantic consistency. Users can assess this score to identify token count inflation with low-effort token injection. Together, these components enable CoIn to identify misreported token counts and fabricated reasoning traces, enabling transparent billing without exposing proprietary data. In practice, CoIn can be deployed as a trusted third-party auditing service that ensures billing transparency while preserving the integrity and confidentiality requirements of COLA providers. Our main contributions are as follows: • We define the COLA architecture and formalize the emerging threat of token count inflation , categorizing both naive and adaptive inflation strategies. • We design CoIn , a verification framework combining token quantity verification via verifiable hashing and semantic validity verification via embedding relevance, to audit invisible reasoning tokens without exposing proprietary content. • Our experiments demonstrate that CoIn can achieve a 94.7% detection success rate against various adaptive attacks with less than 40% embedding exposure and less than 4% token visibility. Moreover, even when 10% of tokens are maliciously forged by COLA, CoIn still maintains a 40.1% probability of successful detection. (a) (b) Figure 1 : Ratio of reasoning tokens to answer tokens across datasets and deployed APIs. (a) Token ratios on the OpenR1-Math dataset across different OpenAI reasoning models. (b) Token ratios of the DeepSeek-R1 DeepSeek-AI 2025 across various reasoning datasets. In both cases, the number of reasoning tokens often exceeds answer tokens by an order of magnitude or more. 2 Related Work Reasoning Model. LLMs have shown strong performance on complex reasoning tasks by generating intermediate steps, a technique known as chain-of-thought prompting Wei et al. 2022 . This paradigm has been further enhanced by methods such as self-consistency Wang et al. 2022 and program-aided reasoning Gao et al. 2023 . Recent research reveals that generating more reasoning steps at inference time can lead to higher answer accuracy, a phenomenon referred to as the test-time scaling law Snell et al. 2024 , which has become a guiding principle for optimizing LLMs. Reasoning models are typically LLMs fine-tuned via RL Rafailov et al. 2023 ; Wu et al. 2023 ; Ramesh et al. 2024 to produce structured reasoning traces before generating final answers, thereby improving answer quality. These reasoning traces are often longer, more indirect, and may include failed attempts, but are nonetheless closely tied to the final answer Hao et al. 2024 ; Yang et al. 2025 . Since these reasoning tokens are generated in the same autoregressive manner as answer tokens, COLA charge for them based on token count. However, the indirect and verbose nature of reasoning makes it challenging to audit their legitimacy without direct access to the reasoning traces themselves. COLA Auditing. Several works have emerged to address the lack of transparency in COLA. Cai et al. 2025 proposes a watermark-based method to audit whether a COLA uses the required LLM rather than a cheaper LLM. Similarly, Yuan et al. 2025 develops a user-verifiable

Read the complete text