Collaborative LLM Numerical Reasoning with Local Data Protection

Min Zhang, Yuzhe Lu, Yun Zhou, Panpan Xu, Lin Lee Cheong, Chang-Tien Lu, Haozhu WangarXiv 2025 · DOI

Introduction

Numerical reasoning—the capacity to interpret context and execute multi-step calculations—remains a significant challenge for small, on-device language models. While large language models (LLMs) like GPT-4 excel at these tasks, processing sensitive documents such as financial reports or medical records via remote APIs introduces substantial privacy risks.

Existing privacy-preserving techniques often suffer from two primary flaws. First, "incoherent synthesis" methods that mask data through high-level descriptions often disrupt the logical chain, rendering the remote model's output useless. Second, even when a remote model provides a "hint," small local models frequently lack the reasoning capacity to integrate that guidance with local data effectively. This paper introduces a collaborative framework that addresses these issues by "outsourcing" logic while keeping sensitive data local.

Methodology: Topic-Shifted Reasoning

The proposed framework utilizes a two-pronged strategy to bridge the gap between privacy and performance without sacrificing logical integrity.

Topic-Shifted and Pattern-Preserving Query Synthesis

Instead of simple masking, the local model "translates" the problem into a different domain. For instance, a query regarding "aircraft fuel consumption" might be rewritten as one about "advertising revenue." Crucially, the "inferential skeleton"—the underlying mathematical relationships—remains identical.

Numeric Switch and Tool-based Reconstruction

To further secure the data, actual numbers are obfuscated using a local mapping dictionary. Instead of requesting a natural language answer, the framework prompts the remote model for a Python code snippet (a "tool"). Because the logic is preserved during the topic shift, the local system can execute this code by plugging the original sensitive numbers back in. This "plug-and-play" approach removes the reasoning burden from the local model.

Overview of the Topic-Shifted and Pattern-Preserving Query Synthesis and Tool-based Answer Reconstruction framework.

Experimental Evaluation

The framework was evaluated on two rigorous benchmarks: FinQA (complex financial questions) and MultiHiertt (reasoning over hierarchical tables and text). A specialized "Topic Rewriter" model was distilled using a subset of the MultiHiertt training data.

Key Results

The method significantly outperformed traditional privacy-preserving baselines:

  • Accuracy: On MultiHiertt, the framework improved accuracy by 16.2% to 43.6% over other collaboration methods.
  • Privacy: Data leakage was reduced by 2.3% to 44.6%.
  • Efficiency: A 3.8B parameter model (Phi-3-mini) using this framework achieved 80.1% accuracy on MultiHiertt, nearing the performance of a full remote GPT-4 model while maintaining data security.
Performance metrics for Phi3 on the MultiHiertt dataset, showing the trade-off between accuracy and data protection across different thresholds.

Discussion and Limitations

The study reveals that for mathematical problems, the topic is often secondary to the logic. By decoupling the semantic surface from the logical pattern and using code as a universal bridge, the system achieves robust privacy.

However, limitations remain. Approximately 33% of errors originated from the remote LLM (e.g., coding mistakes), and 20% stemmed from local retrieval failures. Future work will focus on making the "Topic Rewriter" more lightweight and resilient against logical hallucinations during the translation process.

Summary updated

BibTeX
@misc{zhang2025collaborative,
  author = {Min Zhang and Yuzhe Lu and Yun Zhou and Panpan Xu and Lin Lee Cheong and Chang-Tien Lu and Haozhu Wang},
  title = {{Collaborative LLM Numerical Reasoning with Local Data Protection}},
  year = {2025},
  eprint = {2504.00299},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.00299},
}
Figure