A Bidirectional Generation Pipeline for Hierarchical Queries and Rich Relevance in Financial Chinese Passage Retrieval
Paper · arXiv:2508.02222
Dataset · valuesimplex-ai-lab/FinCPRG
Related · FinBERT2
FinCPRG is an ECML-PKDD 2025 project for building a Chinese financial passage-retrieval dataset via a bidirectional generation pipeline: bottom-up (intra-doc) and top-down (cross-doc) hierarchical query generation, plus indirect positive mining for richer relevance labels. Core modules live in fincprg/; the full dataset is on Hugging Face.
| Item | Scale / Result |
|---|---|
| Seed corpus | ~1.3k Chinese financial research reports |
| Query hierarchy | Sentence / paragraph / topic levels |
| Annotations | ~95k query–passage pairs with rich relevance |
| Mining quality | Indirect positives via CrossEncoder; paper-reported false-negative rate ≈ 4% |
| Training (paper) | e.g. bge-base-zh on FinMTEB: avg NDCG@10 0.458 → 0.640 |
| Paper stage | Module |
|---|---|
| Preprocess (chunk reports) | fincprg/preprocess.py |
| Bottom-up QG (sentence / paragraph) | fincprg/query_gen.py |
| Top-down QG (topic) | notebooks/topic_query_gen.ipynb + fincprg/merge_tokenizer.py |
| Indirect positive mining | fincprg/mine_positives.py |
| Industry labels | fincprg/industry_label.py, fincprg/industry_soft.py |
Localized traversal spaces (mining):
- Sentence-level: other sentence queries within the same document
- Paragraph-level: same industry / max topic subtree
- Topic-level: topic sub-queries vs paragraph queries in the same hierarchy
git clone https://github.com/mengyougithub/FinCPRG.git
cd FinCPRG
pip install -r requirements.txt
cp .env.example .env # only for LLM query-generation
python examples/demo_preprocess.py
python examples/demo_indirect_positives.py --device cpuMore detail: examples/README.md.
Proprietary full-corpus cleaning is omitted; this repo focuses on core pipeline modules + the public HF release.
FinCPRG/
├── fincprg/ # Importable core package
│ ├── preprocess.py
│ ├── query_gen.py
│ ├── mine_positives.py
│ ├── industry_label.py
│ ├── industry_soft.py
│ ├── merge_tokenizer.py
│ └── resources/ # stopwords / userdict
├── notebooks/ # Topic-level QG notebook
├── examples/ # Toy demos (no API key)
├── experimental/ # Scratch scripts
├── assets/overview.svg
├── data/ # Local inputs (gitignored)
├── requirements.txt
├── .env.example
├── CITATION.cff
└── LICENSE
Core modules and the Hugging Face dataset are public. Full proprietary report cleaning and internal utilities are not included. Treat `examples/` as the supported minimal entry point.
@inproceedings{xu2025FinCPRG,
title={FinCPRG: A Bidirectional Generation Pipeline for Hierarchical Queries and Rich Relevance in Financial Chinese Passage Retrieval},
author={Xuan Xu, Beilin Chu, Qinhong Lin, Yixiao Zhong, Fufang Wen, Jiaqi Liu, Binjie Fei, Yu Li, Zhongliang Yang, Linna Zhou},
journal={Proceedings of the European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases: ECML-PKDD 2025},
year={2025}
}
@inproceedings{xu2025finbert2,
author = {Xu Xuan and Wen Fufang and Chu Beilin and Fu Zhibing and Lin Qinhong and Liu Jiaqi and Fei Binjie and Li Yu and Zhou Linna and Yang Zhongliang},
title = {FinBERT2: A Specialized Bidirectional Encoder for Bridging the Gap in Finance-Specific Deployment of Large Language Models},
booktitle = {Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V.2 (KDD '25)'},
year = {2025},
doi = {10.1145/3711896.3737219},
url = {https://doi.org/10.1145/3711896.3737219}
}FinCPRG(ECML-PKDD 2025)面向中文金融段落检索,提出双向生成管线:自下而上(文档内句子/段落级查询)与自上而下(跨文档主题级查询),并用 CrossEncoder 做间接正样本挖掘。约 1.3k 份研报、约 95k 条标注;论文报告的间接挖掘假阴性率约 4%,训练实验中例如 bge-base-zh 在 FinMTEB 上平均 NDCG@10 0.458→0.640。
核心代码在 fincprg/;完整专有清洗未收录;最小示意见 examples/。