Developed by Mark Russinovich with various AI assistants, including Cursor, GitHub Copilot and Claude Code
A comprehensive tool for validating reference accuracy in academic papers, useful for both authors checking their bibliography and conference reviewers ensuring that paper references are authentic and accurate. This tool processes papers from various local and online sources including ArXiv, PDF files, LaTeX documents, and text files to verify the accuracy of references by comparing cited information against authoritative sources.
π Processing: Attention Is All You Need
URL: https://arxiv.org/abs/1706.03762
[1/45] Neural machine translation in linear time
Nal Kalchbrenner, Lasse Espeholt, Karen Simonyan, Aaron van den Oord, Alex Graves, Koray Kavukcuoglu
2017
β οΈ year: Year mismatch: cited as 2017 but actually 2016
[2/45] Effective approaches to attention-based neural machine translation
Minh-Thang Luong, Hieu Pham, Christopher D. Manning
2015
β author: First author mismatch: 'Minh-Thang Luong' vs 'Thang Luong'
============================================================
π SUMMARY
============================================================
π Total references processed: 68
β Total errors: 55
β οΈ Total warnings: 16
β References that couldn't be verified: 15
πΎ Detailed results saved to: reference_errors.txt
- π Sample Output
- π― Features
- π Quick Start
- π€ LLM-Enhanced Reference Extraction
- π¦ Installation
- π Usage
- π Output and Results
- βοΈ Configuration
- ποΈ Local Database Setup
- π§ͺ Testing and Validation
- π License
- π Multiple Input Formats: Process ArXiv papers, local PDFs, LaTeX files, and text documents
- π Advanced Bibliography Detection: Uses intelligent pattern matching to identify bibliography sections
- π€ LLM-Enhanced Reference Extraction: Recommended AI-powered bibliography parsing with support for OpenAI, Anthropic, Google, Azure, and local vLLM
- β Comprehensive Error Detection: Identifies issues with titles, authors, years, venues, URLs, and DOIs
- π Multi-Tier Verification Sources: Uses a prioritized check of Semantic Scholar, OpenAlex, and CrossRef with intelligent retry logic
- π§ Smart Title Matching: Advanced similarity algorithms handle common academic formatting variations (BERT vs B-ERT, pre-trained vs pretrained)
- π’ Venue Normalization: Recognizes common journal and conference abbreviation patterns
- π Detailed Reporting: Generates comprehensive error reports with drop-in corrected references
-
Check a famous paper:
python refchecker.py --paper 1706.03762
-
Check your own PDF:
python refchecker.py --paper /path/to/your/paper.pdf
-
For faster processing with local database (see Local Database Setup):
python refchecker.py --paper 1706.03762 --db-path semantic_scholar_db/semantic_scholar.db
β‘ Performance Tip: Reference verification takes 5-10 seconds per reference without a Semantic Scholar API key due to rate limiting. With an API key, verification speeds up to 1-2 seconds per reference. Set
SEMANTIC_SCHOLAR_API_KEYenvironment variable or use--semantic-scholar-api-keyfor faster processing.
RefChecker supports AI-powered bibliography parsing using Large Language Models (LLMs) for improved accuracy with complex citation formats. While models as small as Llama 3.1-8B are fairly reliable at reference extraction, they can struggle with non-standard bibliographies. GPT-4o frequently hallucinates DOIsClaude while Sonnet 4 has shown the best performance on large, complex bibliographies.
- OpenAI e.g., GPT-4o, o3
- Anthropic e.g., Claude Sonnet 4
- Google e.g., Gemini 2.5
- Azure OpenAI e.g., GPT-4o, o3
- vLLM e.g., Local Hugging Face models via OpenAI-compatible server
-
Using Environment Variables:
# Enable LLM with Anthropic Claude export REFCHECKER_USE_LLM=true export REFCHECKER_LLM_PROVIDER=anthropic export ANTHROPIC_API_KEY=your_api_key_here python refchecker.py --paper 1706.03762
-
Using Command Line Arguments:
# Enable LLM with specific provider and model python refchecker.py --paper 1706.03762 \ --llm-provider anthropic \ --llm-model claude-sonnet-4-20250514 \The command line supports an
--llm-keyparameter, but recommended usage is to set the environment variable API key setting for the provider you select.
With OPENAI_API_KEY environment variable:
python refchecker.py --paper /path/to/paper.pdf \
--llm-provider openai \
--llm-model gpt-4o \With ANTHROPIC_API_KEY environment variable:
python refchecker.py --paper https://arxiv.org/abs/1706.03762 \
--llm-provider anthropic \
--llm-model claude-sonnet-4-20250514 \python refchecker.py --paper paper.tex \
--llm-provider google \
--llm-model gemini-2.5-flash \
--llm-key your-google-keypython refchecker.py --paper paper.txt \
--llm-provider azure \
--llm-model gpt-4 \
--llm-key your-azure-key \
--llm-endpoint https://your-resource.openai.azure.com/For running models locally:
# automatic Huggingface model download with VLLM server launch
python refchecker.py --paper paper.pdf \
--llm-provider vllm \
--llm-model meta-llama/Llama-3.1-8B-Instruct You can debug vllm server issues by running refchecker with the --debug flag.
For the latest development version with all features:
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ refchecker[llm,dev,optional]This installs RefChecker with:
- llm: Support for OpenAI, Anthropic, Google, Azure, and vLLM providers
- dev: Development tools (pytest, black, flake8, mypy)
- optional: Enhanced features (lxml, selenium, pikepdf, nltk, scikit-learn)
For a minimal installation:
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ refcheckergit clone https://github.com/markrussinovich/refchecker.git
cd refcheckerpip install -r requirements.txtFor enhanced performance and LLM support, you can install optional dependencies:
# For LLM providers
pip install openai # For OpenAI GPT models
pip install anthropic # For Anthropic Claude models
pip install google-generativeai # For Google Gemini models
# For faster XML/HTML parsing
pip install lxml
# For dynamic web scraping (if needed)
pip install selenium
# For better PDF processing
pip install pikepdfCheck papers in various formats and online locations:
# Check a specific ArXiv paper by ID
python refchecker.py --paper 1706.03762
# Check by ArXiv URL
python refchecker.py --paper https://arxiv.org/abs/1706.03762
# Check by ArXiv PDF URL
python refchecker.py --paper https://arxiv.org/pdf/1706.03762.pdf# Check a local PDF file
python refchecker.py --paper /path/to/your/paper.pdf
# Check with offline database for faster processing
python refchecker.py --paper /path/to/your/paper.pdf --db-path semantic_scholar_db/semantic_scholar.db# Check a LaTeX document
python refchecker.py --paper /path/to/your/paper.tex
# Check with debug mode for detailed processing info
python refchecker.py --paper /path/to/your/paper.tex --debug# Check a plain text file containing paper content
python refchecker.py --paper /path/to/your/paper.txt
# Combine with local database for offline verification
python refchecker.py --paper /path/to/your/paper.txt --db-path semantic_scholar_db/semantic_scholar.dbreference_errors.txt: Detailed report of references with errors and warnings, including corrected references
-
β Errors: Critical issues that need correction
author: Author name mismatches[16/19] Bag of tricks: Benchmarking of jailbreak attacks on llms T. Xie, X. Qi, Y. Zeng, Y. Huang, U. M. Sehwag, K. Huang, L. He, B. Wei, D. Li, Y. Sheng et al β author: First author mismatch: 'T. Xie' vs 'Zhao Xu'title: Title discrepancies[8/19] BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding J. Devlin, M.-W. Chang, K. Lee, K. Toutanova β title: Title mismatch: cited as 'BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding' but actually 'BERT: Pre-training of Deep Bidirectional Transformers for Language Comprehension'url: Incorrect URLs or arXiv IDs[5/19] Jbshield: Neural representation-level defense against adversarial prompts in large language models W. Zhang, M. Li, H. Wang β arxiv_id: Incorrect ArXiv ID: ArXiv ID 2503.01234 points to 'Self-Adaptive Gamma Context-Aware SSM-based Model for Metal Defect Detection'doi: DOI mismatches
-
β οΈ Warnings: Minor issues that may need attentionyear: Publication year differences (common due to multiple paper versions)[14/19] Smoothllm: Defending large language models against jailbreaking attacks A. Robey, E. Wong, H. Hassani, G. J. Pappas β οΈ year: Year mismatch: cited as 2024 but actually 2023venue: Venue format variations[2/19] Gradient cuff: Detecting jailbreak attacks on large language models by exploring refusal loss landscapes X. Hu, P.-Y. Chen, T.-Y. Ho β οΈ venue: Venue mismatch: cited as 'arXiv, 2024' but actually 'Neural Information Processing Systems'
-
β Unverified: References that couldn't be verified with any of the checker APIs
[15/19] Llama guard: A fine-tuned safety model for prompt moderation M. A. Research β Could not verify: Llama guard: A fine-tuned safety model for prompt moderation Cited as: M. A. Research (2024) URL: https://research.meta.com/publications/llama-guard-a-fine-tuned-safety-model-for-prompt-moderation/
# Basic options
--paper PAPER # Paper to check (ArXiv ID, URL, or file path)
--debug # Enable debug mode
--semantic-scholar-api-key KEY # Semantic Scholar API key (1-2s vs 5-10s without key; can also use SEMANTIC_SCHOLAR_API_KEY env var)
--db-path PATH # Local database path
# LLM options
--llm-provider {openai,anthropic,google,azure,vllm} # Enable LLM with provider
--llm-model MODEL # Override default model
--llm-key KEY # Optional API key for LLM provider (environment variable recommended)
--llm-endpoint URL # Override endpoint (for Azure/vLLM)# Enable/disable LLM
export REFCHECKER_USE_LLM=true
# Provider selection
export REFCHECKER_LLM_PROVIDER=anthropic # openai, anthropic, google, azure
# Semantic Scholar API key (for higher rate limits and faster verification: 1-2s vs 5-10s without key)
export SEMANTIC_SCHOLAR_API_KEY=your_key
# Provider-specific API keys (native environment variables preferred)
export OPENAI_API_KEY=your_key # or REFCHECKER_OPENAI_API_KEY
export ANTHROPIC_API_KEY=your_key # or REFCHECKER_ANTHROPIC_API_KEY
export GOOGLE_API_KEY=your_key # or REFCHECKER_GOOGLE_API_KEY
export AZURE_OPENAI_API_KEY=your_key # or REFCHECKER_AZURE_API_KEY
export AZURE_OPENAI_ENDPOINT=your_endpoint # or REFCHECKER_AZURE_ENDPOINT
# Model configuration
export REFCHECKER_LLM_MODEL=claude-sonnet-4-20250514
export REFCHECKER_LLM_MAX_TOKENS=4000
export REFCHECKER_LLM_TEMPERATURE=0.1Create a local database for offline verification:
# Download recent computer science papers
python download_semantic_scholar_db.py \
--field "computer science" \
--start-year 2020 \
--end-year 2024 \
--batch-size 100
# Download papers matching a specific query
python download_semantic_scholar_db.py \
--query "attention is all you need" \
--batch-size 50
# Download with API key for higher rate limits
python download_semantic_scholar_db.py \
--api-key YOUR_API_KEY \
--field "machine learning" \
--start-year 2023--output-dir: Directory to store database (default:semantic_scholar_db)--batch-size: Papers per batch (default: 100)--api-key: Semantic Scholar API key for higher limits--fields: Metadata fields to include--query: Search query for specific papers--start-year/--end-year: Year range filter
# Test with comprehensive reference validation suite
python tests/validate_refchecker.py --db-path semantic_scholar_db/semantic_scholar.db
# Test without database (uses enhanced hybrid mode)
python tests/validate_refchecker.py
# Test specific papers
python tests/validate_papers.py --paper attention --db-path semantic_scholar_db/semantic_scholar.db
python tests/validate_papers.py --paper custom --arxiv-id 1706.03762
# Test local database functionality
python tests/validate_local_db.py --db-path semantic_scholar_db/semantic_scholar.db
# Test with debug mode for detailed output
python tests/validate_refchecker.py --debugtests/validate_refchecker.py: Comprehensive validation suite with known good/bad referencestests/validate_papers.py: Tests with specific papers (attention, website references, custom papers)tests/validate_local_db.py: Local database functionality and integrity checkstests/validate_attention_paper.py: Specific validation of "Attention Is All You Need" paper
All validation scripts support:
- Local database testing (
--db-path) - Enhanced hybrid mode testing (default)
- Debug output (
--debug) - API key configuration
This project is licensed under the MIT License - see the LICENSE file for details.