Source-linked AI summary
Dependency-Aware Chain-of-Thought Compression for Financial Reasoning
Wenjun Wu, Lei Fu, Kejian Tong, Tao Ning, Sichen Zhao
TL;DR
Long chain-of-thought traces create latency, memory, and serving-cost burdens in financial reasoning, while direct generation can omit key logical steps. HSDN compresses reasoning chains using dependency-aware structural selection and boundary rewriting, achieving the best reported accuracy–compression trade-off on AFAC2025 while better preserving reasoning coherence than perplexity-based methods.
Problem
Financial reasoning requires integrating textual evidence, numerical calculation, and compliance-oriented interpretation, but full chain-of-thought traces impose substantial computational overhead and direct generation may omit key logical steps.
Method
HSDN segments reasoning chains, constructs a dependency graph, scores segment importance with graph centrality, selects segments structurally, and rewrites local boundaries for fluency.
Results
HSDN achieves the best trade-off between accuracy and compression on AFAC2025, while removing the dependency graph causes a 4% accuracy drop and graph-guided compression better preserves reasoning coherence than LLMLingua-2.
Takeaways & Limitations
Structured, interpretable compression can preserve reasoning coherence while adding minimal overhead to fixed LLM feature-extraction and answer-generation costs.
Abstract
from arXiv · showhide
Chain of thought prompting improves complex reasoning, but its long intermediate traces create substantial inference cost and hinder practical deployment in financial settings. We present a Hierarchical Semantic Distillation Network, HSDN, for compressing reasoning chains while preserving answer accuracy and logical coherence. The framework combines semantic segmentation, dependency graph construction, dual encoder importance scoring, constrained segment selection, and local boundary rewriting. A frozen Qwen3 4B model is used only for feature extraction and final answer generation, while the compression process remains structured and interpretable. On the AFAC2025 benchmark, HSDN achieves 91.0% accuracy with 68.4% compression, outperforming strong compression baselines in overall score and reasoning coherence. The results show that graph guided compression is effective for high stakes financial reasoning tasks.
1 INTRODUCTION
Financial reasoning benefits from organized intermediate steps, but lengthy chains raise latency, memory, and serving costs. Existing approaches trade efficiency against preserving the logical detail needed for high-stakes financial tasks.
- 1 INTRODUCTION: Longer reasoning traces increase latency, memory usage, and serving cost in financial applications.Financial tasks require textual evidence integration, numerical calculation, and compliance-oriented interpretation under strict correctness requirements.
- 1 INTRODUCTION: Direct generation is efficient but can omit key logical steps, whereas full chain-of-thought preserves detail at the cost of excessive verbosity.
- 1 INTRODUCTION: Reasoning quality depends partly on how intermediate steps are organized and exposed during inference, not only on model scale.
2 RELATED WORK
Related work improves long-context efficiency through global attention mechanisms and studies fine-grained consistency assessment. These approaches do not directly determine which reasoning steps to retain for faithful chain compression.
- 2 RELATED WORK: Sparse attention architectures such as Longformer and BigBird improve long-document scalability by restricting or restructuring attention patterns.
- 2 RELATED WORK: Token-level representation efficiency does not directly determine which reasoning steps should be retained for answer-faithful chain compression.
- 2 RELATED WORK: SENTINEL detects subtle semantic inconsistencies between two candidate outputs for the same source.This provides a perspective for assessing whether compression introduces manipulative distortions.
3 METHODOLOGY
HSDN compresses financial reasoning through structured semantic segmentation, dependency-aware selection, and boundary rewriting, while using a frozen Qwen3-4B model for semantic features and final answers.
- 3 METHODOLOGY: HSDN uses semantic segmentation, dependency graph construction, importance scoring, constrained segment selection, and boundary rewriting.The overview identifies BiLSTM-CRF, biaffine attention, dual-encoder scoring, dynamic programming, and copy-augmented sequence-to-sequence rewriting as the corresponding components.
- 3 METHODOLOGY: The framework is designed to compress lengthy reasoning chains while preserving logical integrity in complex financial inference.
- 3 METHODOLOGY: A frozen Qwen3-4B model provides semantic features and generates final answers within the structured compression pipeline.
4 ALGORITHM AND MODEL
The algorithm segments reasoning into coherent units, builds an acyclic dependency graph, scores and selects segments under constraints, and rewrites boundaries to restore fluency while preserving content.
- 4.1 Boundary Detection: A BiLSTM-CRF boundary detector partitions reasoning text into semantic units while respecting reasoning-step boundaries.
- 4.1 Boundary Detection: Bidirectional context improves detection of boundaries preceding numerical computations whose significance depends on subsequent calculations.
- 4.1 Boundary Detection: Numerical span constraints prohibit boundaries inside multi-token financial expressions such as percentage changes or currency amounts.
- 4.1 Boundary Detection: Table-cell boundary pretraining helps the detector avoid splitting references to tables and structured data.
- 4.2 Dependency Graph Construction: The dependency graph encodes logical relations between segments so compression does not orphan dependent segments.
- 4.2 Dependency Graph Construction: Acyclicity regularization makes the expected graph acyclic, while inference pruning removes the lowest-probability edge from detected cycles.The regularizer is zero if and only if the expected graph is acyclic; training typically leaves fewer than two pruning iterations.
4.3 Importance Scoring and Selection
The selection module scores each reasoning segment for question relevance and selects an importance-maximizing subset under length and dependency constraints. Graph centrality augments segment features so foundational segments are more likely to be preserved.
- Constrained selection: Dynamic programming selects the highest-importance subset while respecting the length budget and requiring every selected segment’s dependencies.The optimization is performed on a topologically sorted dependency graph.
- Importance scoring: A dual-encoder separately represents the question and each segment, then uses cross-attention to score segment relevance.The design permits scoring all segments with one question-encoding pass.
- Importance scoring: Graph centrality, including PageRank and out-degree, is incorporated into segment features because dependent segments may require foundational information.The feature vector also includes segment length, position, and numerical-content indicators.
- Constrained selection: The selection problem has time complexity O(K· L_budget) and uses preprocessed parent masks for constant-time dependency checks.Here K is the number of segments and L_budget is the allowed total length.
4.4 Boundary Rewriting
Boundary rewriting repairs abrupt transitions caused by removing intermediate reasoning segments while aiming to preserve factual content. It uses local context, copy-biased generation, synthetic training pairs, and a similarity-based fallback.
- Boundary rewriting: Direct concatenation can produce incoherent text, so local boundary edits restore fluency after intermediate segments are removed.The rewriting module operates on consecutively selected segments separated by removed material.
- Boundary context extraction: Boundary context is extracted from segment ends and beginnings using 15 tokens from each side.Suffix and Prefix provide the local inputs for each rewritten transition.
- Transition generation: A lightweight sequence-to-sequence transformer generates smoothed transitions from the extracted boundary context.The decoder uses a copy mechanism that biases generation toward input tokens.
- Training and consistency: Rewriting is trained on synthetic boundary pairs created by randomly removing segments from correct reasoning chains.This training procedure is described as avoiding error propagation from the full pipeline.
- Training and consistency: Embedding similarity checks factual consistency, and transitions below threshold τ fall back to concatenation with a generic connective phrase.The similarity compares the original boundary region with the rewritten version.
4.6 LLM Integration
The framework limits the language model to semantic feature extraction and final answer generation, keeping compression structured and interpretable. Its added processing remains tractable, while total complexity is dominated by unavoidable language-model costs.
- LLM roles: The language model has two deliberately limited roles: semantic feature extraction and final answer generation.This design avoids end-to-end neural compression while retaining pretrained representations.
- Feature extraction: A frozen Qwen3-4B model supplies intermediate representations for segment embeddings without fine-tuning.Features are extracted from layer 16 of 32, selected to balance semantic abstraction and surface detail.
- Answer generation: After compression, retained segments are minimally rewritten, concatenated, and passed to the language model for answer generation.The evaluation uses temperature 0.7, nucleus sampling p=0.9, and best-of-5 candidate generation.
- Complexity: The overall complexity is dominated by LLM feature extraction and answer generation, while the framework adds minimal overhead.Segmentation, graph construction, selection, and boundary rewriting each scale tractably with input size.
5 EVALUATION METRICS
The evaluation uses four challenge-protocol metrics covering answer correctness, length reduction, competition performance, and preservation of logical dependencies.
- Evaluation metrics: Best-of-5 accuracy measures correctness when any of five generated samples matches the reference.It evaluates correctness under the paper’s best-of-5 sampling protocol.
- Evaluation metrics: Compression ratio measures the reduction in reasoning-chain length.
- Evaluation metrics: The competition score penalizes incorrect answers using a maximum length L_max.
- Evaluation metrics: Reasoning coherence evaluates whether logical dependencies are preserved.
6 EXPERIMENT RESULTS
The AFAC2025 experiments compare HSDN with baselines and ablations, showing a trade-off between accuracy and compression. The dependency graph is especially important, while graph guidance preserves reasoning coherence better than perplexity-based methods.
- Table 1 reports the main AFAC2025 comparison and ablation study, while Fig. 4 shows changes in model training indicators.
- HSDN achieves the best trade-off between accuracy and compression on AFAC2025.
- Removing the dependency graph causes a 4% accuracy drop.
- HSDN's graph-guided approach better preserves reasoning coherence than perplexity-based methods such as LLMLingua-2.
7 CONCLUSION
The conclusion presents FinStack-Net as a hierarchical ensemble for fraud and gambling account detection. It combines tree-based models with a deep neural network and identifies future work in temporal and graph-based transaction analysis.
- FinStack-Net combines LightGBM, CatBoost, and a deep neural network with residual and attention mechanisms for fraud and gambling account detection.
- The study reports state-of-the-art results after data preprocessing, feature engineering, and hyperparameter optimization.
- Ablation studies demonstrate the importance of each architectural component and support the robustness of the ensemble strategy.
- Future research will explore temporal sequence models and graph-based transaction analysis to enhance detection performance.