Verify and fix BibTeX citations with Semantic Scholar to detect AI hallucinations and incorrect references.
With the widespread adoption of LLMs (like ChatGPT, Claude, and DeepSeek) in academic writing, a critical problem has emerged: Citation Hallucination. AI models frequently invent plausible-sounding but entirely fake papers, mix up real authors with incorrect titles, or hallucinate non-existent publication venues.
VeriBib is designed to act as an automated fact-checker for your reference list. It helps researchers verify their BibTeX citations by:
- Cross-referencing citations against Semantic Scholar to detect completely fabricated papers.
- Identifying "partial hallucinations" (e.g., real paper title, but hallucinated authors or publication year).
- Using reliable LLMs to analyze and match generated metadata against verified, real-world sources.
- Automatically abbreviating conference and journal names to standard formats (ICML, CVPR, IEEE TPAMI, etc.).
- Ensuring your bibliography is real, accurate, and academically rigorous before submission.
- 🚨 Hallucination Detection: Instantly flags completely fabricated papers or "ghost citations" that do not exist in real academic databases.
- 🔍 Fact-Checking Search: Queries Semantic Scholar to verify the actual existence of the paper and retrieves its true metadata.
- 🤖 LLM-Powered Verification: Intelligently compares your BibTeX entry against real-world search results to catch subtle AI-generated errors (like mixed-up author lists or hallucinated journals).
- 📊 Smart Matching: Detects author name variations, venue differences, and year mismatches caused by AI confusion.
- 🔄 Auto-Fix: Automatically fetches correct metadata (title, authors, year, DOI) and standardizes venue abbreviations.
- 📝 Flexible Output: Generates Markdown reports and optimized BibTeX files with side-by-side comparison of original and updated entries.
- 🔌 Multiple LLM Providers: Support for 6+ LLM APIs to perform the verification analysis.
| Provider | Model | Alias |
|---|---|---|
| DeepSeek | DeepSeek Chat | deepseek |
| OpenAI | GPT-4o, GPT-4o-mini | openai, gpt |
| Gemini | gemini |
|
| Anthropic | Claude | claude |
| Alibaba | Qwen | qwen |
| Moonshot | Kimi | kimi |
pip install requestsEdit config.py:
# Semantic Scholar API Key (free)
SS_API_KEY = "your_semantic_scholar_key"
# LLM API (choose one)
LLM_API_KEY = "your_llm_key"
LLM_PROVIDER = "deepseek" # deepseek, qwen, kimi, gpt, openai, claude, gemini
LLM_MODEL = "deepseek-chat"💡 Note: Semantic Scholar provides a free API with 100 requests per second for academic research.
# Basic usage
python main.py input.bib
# Custom output files
python main.py input.bib -o fixed.bib -r report.md
# Skip output files
python main.py input.bib --no-output --no-report| Status | Key | Orig author | Orig journal | Orig title | Orig year | New title | New author | New year | New journal | New booktitle | New doi | SS Link |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| radford2021learning | Radford, Alec and Kim, Jong Wook and Hallacy, Chris and Ramesh, Aditya and Goh, Gabriel and Agarwal, Sandhini and Sastry, Girish and Askell, Amanda and Mishkin, Pamela and Clark, Jack and others | arXiv preprint arXiv:2103.00020 | Learning Transferable Visual Models From Natural Language Supervision | 2021 | Learning Transferable Visual Models From Natural Language Supervision | Alec Radford and Jong Wook Kim and Chris Hallacy and A. Ramesh and Gabriel Goh and S. Agarwal and G. Sastry and Amanda Askell and Pamela Mishkin and Jack Clark and Gretchen Krueger and I. Sutskever | 2021 | International Conference on Machine Learning | ICML | - | - |
# Original BibTeX
@article{radford2021learning,
title={Learning Transferable Visual Models From Natural Language Supervision},
author={Radford, Alec and Kim, Jong Wook and Hallacy, Chris and Ramesh, Aditya and Goh, Gabriel and Agarwal, Sandhini and Sastry, Girish and Askell, Amanda and Mishkin, Pamela and Clark, Jack and others},
journal={arXiv preprint arXiv:2103.00020},
year={2021}
}
# Optimized BibTex
@inproceedings{radford2021learning,
title={Learning Transferable Visual Models From Natural Language Supervision},
author={Alec Radford and Jong Wook Kim and Chris Hallacy and A. Ramesh and Gabriel Goh and S. Agarwal and G. Sastry and Amanda Askell and Pamela Mishkin and Jack Clark and Gretchen Krueger and I. Sutskever},
booktitle={ICML},
year={2021},
}| Option | Description |
|---|---|
input |
Input BibTeX file (default: test.bib) |
-o, --output |
Output optimized BibTeX file (default: output_updated.bib) |
--no-output |
Skip BibTeX output |
-r, --report |
Output report file (default: bib_report.md) |
--no-report |
Skip report output |
- Verify conference papers (NeurIPS, ICML, CVPR, ICCV, ACL, EMNLP, etc.)
- Check arXiv preprints against final publications
- Validate author names and affiliations
- Ensure citation accuracy before submission
- Compare BibTeX against published versions
- Generate verification reports for supplementary materials
- Batch verify entire citation databases
- Export optimized BibTeX for database updates
bib_checker/
├── config.py # API keys & settings
├── main.py # CLI entry point
├── bib_parser.py # BibTeX parsing
├── semantic_scholar.py # Semantic Scholar API client
├── matcher.py # LLM paper matching
├── venue_utils.py # Venue abbreviation
├── exporter.py # Output generation
├── test.bib # Sample input
└── README.md
Built-in dictionary includes 40+ common venues:
- Conferences: CVPR, ICCV, ECCV, NeurIPS, ICLR, ICML, IJCAI, MICCAI, AAAI, ACMMM, BMVC, etc.
- Journals: IEEE TPAMI, IJCV, TIP, TVCG, TNNLS, TMM, PR, InfFus, etc.
The LLM can also generate abbreviations for unknown venues based on the known patterns.
MIT License
