TEFM Framework: Achieving Trustworthy Structured Data Modeling with Just 1% of Tokens

TEFM achieves trustworthy structured data modeling by retaining only ~1% of tokens via behavioral coding.
The TEFM (Token-Efficient Faithful Modeling) framework tackles two critical barriers to deploying LLMs in high-risk domains: token efficiency and reasoning faithfulness. By compressing structured data into behavioral code tokens and applying dual-fidelity objectives, TEFM retains only ~1% of tokens while maintaining competitive accuracy and producing genuinely evidence-grounded reasoning. Validated across clinical and security datasets on Qwen3, Gemma-2, and Phi-4, it offers a promising path for cost-effective, trustworthy AI deployment.
Two Major Barriers to Deploying LLMs in Critical Domains: Token Efficiency and Faithfulness
When we try to apply large language models (LLMs) to critical domains like medical diagnosis and security detection, two fundamental obstacles stand in the way: Token efficiency and Faithfulness.
Tokens are the basic unit of measurement for how LLMs process text, and the cost of each API call is directly tied to the number of input and output tokens. Take GPT-4 as an example: processing a clinical observation record with thousands of rows can consume tens of thousands of tokens, with a single inference costing several dollars. When scaled to the thousands of medical records a hospital processes daily, the annualized cost becomes staggering. This is why token efficiency isn't just a technical optimization issue — it's a critical economic factor that determines whether an LLM solution is commercially viable in production environments.
Structured data (such as clinical observation records and security logs) tends to be lengthy and complex. Feeding it directly into an LLM consumes massive amounts of tokens, driving up inference costs. Even more challenging is the question of whether the model's conclusions are truly based on the input data, or if it's "confidently fabricating reasoning" — a particularly fatal concern in medical and security scenarios where there's zero tolerance for error. LLM "hallucination" refers to the model generating content that seems plausible but has no factual basis. In open-ended conversations, hallucinations may only cause misinformation; but in medical diagnosis, an inference conclusion lacking real evidence could directly affect treatment decisions, with unthinkable consequences. Faithfulness and Hallucination are opposing concepts: the former requires every step of the model's reasoning to be strictly grounded in the given input, while the latter occurs when the model goes off-script and "improvises" beyond the input. Current industry approaches for evaluating faithfulness include attribution analysis, feature importance verification, and others, but most can only detect issues after the fact and struggle to impose constraints during the model's inference process.
A recently published paper on arXiv proposes a framework called TEFM (Token-Efficient Faithful Modeling) that attempts to solve both problems at once. Its core claim is striking: by retaining only about 1% of tokens, it can achieve competitive classification accuracy while producing faithful reasoning evidence.

TEFM's Two Core Technologies: Behavioral Coding and Dual-Fidelity Objectives
Behavioral Coding — An Extreme Token Compression Approach
The key to TEFM's token efficiency lies in compressing lengthy structured observation data into compact Behavioral Code tokens.
The elegance of this approach is that it doesn't simply truncate or sample — instead, it encodes information from the raw data into a set of highly condensed representations in a nearly lossless manner. The design philosophy of behavioral coding has an intrinsic connection to Rate-Distortion Theory in information theory. Proposed by Claude Shannon, rate-distortion theory addresses a core question: given a tolerable level of information distortion, what is the minimum degree to which data can be compressed? TEFM's behavioral coding is essentially seeking an optimal compressed representation of structured data — it doesn't preserve every detail of the original data, but retains the information that is truly useful for downstream classification tasks. This shares similarities with traditional Feature Selection and dimensionality reduction techniques (such as PCA and Autoencoders), but the key difference is that behavioral codes are presented directly as token sequences that can seamlessly plug into the LLM's inference pipeline without requiring additional feature engineering steps.
According to the paper's data, TEFM retains only about 1% of tokens in clinical domains and about 2% of tokens in security domains. Inference costs can therefore be reduced by one to two orders of magnitude.
For industries like healthcare, finance, and cybersecurity that need to process massive volumes of structured records, this compression ratio isn't just cost optimization — it directly determines whether an LLM solution is feasible in real-world production environments.
Dual-Fidelity Objectives — Making LLM Reasoning Truly Evidence-Based
Efficiency alone isn't enough. TEFM's other core innovation is ensuring inference faithfulness through a dual-fidelity objective.
This mechanism simultaneously optimizes at two levels:
- Code-level reconstruction: Ensures that the compressed behavioral codes can faithfully reproduce the original information, preventing the loss of key features during compression.
- Prediction-level fidelity: Ensures that the model's predictions are truly built upon the input data, rather than inferred from thin air.
Through this dual constraint, TEFM can identify minimal sufficient feature subsets — the most streamlined set of key evidence needed to make correct judgments. The concept of minimal sufficient feature subsets is rooted in the theory of Sufficient Statistics. The concept of sufficiency, proposed by Ronald Fisher, states that if a statistic contains all the information in a sample about a certain parameter, then it is sufficient. Extending this idea to machine learning, a minimal sufficient feature subset is the most streamlined set of features that can support correct judgments without degrading predictive performance. This concept has theoretical parallels with local explanation methods in Explainable AI (XAI) such as SHAP values and LIME, but TEFM's advantage is that it embeds feature selection directly into the model's training objective, rather than using it as a post-hoc explanation tool.
The model's reasoning process is therefore both concise and traceable, with every conclusion traceable back to specific input evidence.
Experimental Validation: Comprehensive Testing Across Domains and Models
TEFM's experimental design covers multiple dimensions, thoroughly validating the framework's generality and reliability.
At the dataset level, the research team selected datasets from critical domains including clinical and security for validation — precisely the domains that demand the highest faithfulness while also involving the largest data volumes.
At the model backbone level, TEFM was tested on multiple mainstream LLMs including Qwen3, Gemma-2, and Phi-4. Qwen3 is an LLM series developed by Alibaba's Tongyi Lab, known for its multilingual capabilities and long-context processing; Gemma-2 is a lightweight open-source model from Google DeepMind based on the Gemini technology stack, emphasizing efficient inference at smaller parameter scales; Phi-4 is a representative of Microsoft Research's small language model series, renowned for its "textbook-quality data" training strategy, delivering outstanding performance at its parameter scale. These three models each have distinct characteristics in architecture design, training data, and parameter scale. TEFM's ability to achieve consistent performance improvements across all three powerfully demonstrates the framework's model-agnostic properties.
This cross-model validation approach shows that TEFM is a general framework decoupled from specific models, not a fine-tuning trick tailored to any particular one.
The experimental conclusions can be summarized in three points:
- Competitive classification accuracy — extreme compression does not come at the cost of performance.
- Dramatic token reduction — approximately 1% token retention in clinical scenarios and approximately 2% in security scenarios.
- Genuinely faithful reasoning — the produced rationales are truly grounded in input data, not hallucinated outputs.
TEFM's Practical Significance for AI Deployment in High-Risk Domains
TEFM's value lies not only in the two techniques themselves, but in how it jointly optimizes "efficiency" and "faithfulness" — two objectives that typically conflict with each other. In previous research, pursuing stronger interpretability often meant introducing more computational overhead, while pursuing efficiency easily compromised reasoning reliability. Through the synergistic design of behavioral coding and dual-fidelity objectives, TEFM attempts to break this trade-off dilemma.
For practitioners in high-risk domains such as medical diagnosis, financial risk management, and cybersecurity, frameworks like this offer an attractive path to deployment: significantly reducing LLM inference costs while meeting the hard requirements of regulatory and professional scenarios for "explainable and traceable" systems. It's worth noting that globally, AI regulatory frameworks are rapidly taking shape — the EU AI Act has classified medical diagnosis, financial credit assessment, and similar applications as "high-risk AI systems," explicitly requiring such systems to be transparent and explainable. The U.S. FDA's approval process for AI-assisted medical devices similarly emphasizes the traceability of algorithmic decisions. Under this regulatory trend, TEFM's ability to identify "minimal sufficient feature subsets" may provide a technical approach to meeting compliance requirements.
Of course, as a newly released preprint paper, TEFM still needs to undergo peer review and broader practical validation. arXiv is an open-access preprint platform maintained by Cornell University, where researchers can publish papers before formal peer review to quickly share findings and gather community feedback. The advantage of preprints is rapid information dissemination, but it also means the paper has not yet undergone systematic review by peer experts — the rigor of its methodology, completeness of experimental design, and reliability of conclusions still require further verification. In the AI field, arXiv has become the most important platform for first-publishing research results, but readers should maintain a cautious attitude when citing and applying preprint conclusions, and watch for whether the work is subsequently accepted by top conferences (such as NeurIPS, ICML, ACL) or journals.
Whether the approximately 1% token retention rate can consistently maintain accuracy in real-world complex scenarios, and the robustness of "minimal sufficient feature subsets" when facing adversarial or noisy data, are both questions worth monitoring going forward. But regardless, TEFM provides a direction well worth deeper investigation for efficient and faithful modeling of structured data.
Key Takeaways
Related articles

HybridDeepResearch: The First Hybrid Deep Research Benchmark Reveals Cross-Modal Integration Bottlenecks in AI Agents
Snowflake's HybridDeepResearch benchmark is the first to require both web search and SQL queries for deep research tasks. Top AI models achieve only ~50% Pass@8 on hard tasks, exposing critical cross-modal handoff bottlenecks.

How AI Emergency Triage Works in Practice: An Auditable Approach to Maternal and Newborn Care in India
India's Noora Health rebuilt its LLM triage system into a two-stage pipeline—LLM symptom extraction plus deterministic rules—boosting recall from 56.5% to 81% across 150K+ patient queries.

Cursor Low-Price Subscription Traps Exposed: Analyzing the Marketing Tactics of Cracked Services
Deep dive into how low-price Cursor subscription services work and the risks they carry. Learn to spot gray-market traps and protect your data as a developer.