Spaces:
Sleeping
Sleeping
MAXNORM8650
commited on
Commit
Β·
291fb52
1
Parent(s):
277f947
Add PC-Bench leaderboard with benchmark results
Browse files- README.md +36 -5
- app.py +187 -0
- requirements.txt +2 -0
README.md
CHANGED
|
@@ -1,14 +1,45 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.3.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
short_description: Paper Discovery Benchmark
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: PC-Bench
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.3.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: mit
|
| 11 |
short_description: Paper Discovery Benchmark
|
| 12 |
+
tags:
|
| 13 |
+
- leaderboard
|
| 14 |
+
- research
|
| 15 |
+
- multi-agent
|
| 16 |
+
- paper-retrieval
|
| 17 |
---
|
| 18 |
|
| 19 |
+
# PC-Bench: Paper Discovery Benchmark
|
| 20 |
+
|
| 21 |
+
Leaderboard for evaluating AI agents on academic paper retrieval and analysis.
|
| 22 |
+
|
| 23 |
+
## Benchmarks
|
| 24 |
+
|
| 25 |
+
| Benchmark | Queries | Description |
|
| 26 |
+
|-----------|---------|-------------|
|
| 27 |
+
| SemanticBench | 50 | Template-based semantic queries |
|
| 28 |
+
| RAbench | 500 | LLM-perturbed natural queries |
|
| 29 |
+
|
| 30 |
+
## Metrics
|
| 31 |
+
|
| 32 |
+
- **MRR** - Mean Reciprocal Rank
|
| 33 |
+
- **R@K** - Recall at K (K=1,5,10,20,50)
|
| 34 |
+
- **Hit Rate** - Successful retrieval percentage
|
| 35 |
+
|
| 36 |
+
## Top Results
|
| 37 |
+
|
| 38 |
+
| Model | Hit Rate | MRR | Time |
|
| 39 |
+
|-------|----------|-----|------|
|
| 40 |
+
| Qwen3-Coder-30B | 80% | 0.627 | 22s |
|
| 41 |
+
| BM25 Baseline | 78% | 0.541 | - |
|
| 42 |
+
|
| 43 |
+
## Links
|
| 44 |
+
|
| 45 |
+
- [GitHub Repository](https://github.com/MAXNORM8650/papercircle)
|
app.py
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import pandas as pd
|
| 3 |
+
|
| 4 |
+
# Paper Retrieval Benchmark Data (from SemanticBench)
|
| 5 |
+
retrieval_data = [
|
| 6 |
+
{"Model": "Qwen3-Coder-30B-Q3_K_M", "Type": "Agent", "Hit Rate": 0.80, "MRR": 0.627, "R@1": 0.58, "R@5": 0.66, "R@10": 0.74, "R@20": 0.78, "R@50": 0.80, "Time (s)": 22.2, "Steps": 1.42},
|
| 7 |
+
{"Model": "qwen3-coder:30b", "Type": "Agent", "Hit Rate": 0.80, "MRR": 0.518, "R@1": 0.46, "R@5": 0.52, "R@10": 0.72, "R@20": 0.76, "R@50": 0.80, "Time (s)": 21.1, "Steps": 1.34},
|
| 8 |
+
{"Model": "BM25", "Type": "Baseline", "Hit Rate": 0.78, "MRR": 0.541, "R@1": 0.48, "R@5": 0.60, "R@10": 0.66, "R@20": 0.78, "R@50": 0.78, "Time (s)": None, "Steps": None},
|
| 9 |
+
{"Model": "microcoder-deepseekr1-14.8b", "Type": "Agent", "Hit Rate": 0.73, "MRR": 0.453, "R@1": 0.38, "R@5": 0.46, "R@10": 0.65, "R@20": 0.69, "R@50": 0.73, "Time (s)": 107.4, "Steps": 4.15},
|
| 10 |
+
{"Model": "deepseek-coder-v3:16b", "Type": "Agent", "Hit Rate": 0.66, "MRR": 0.396, "R@1": 0.32, "R@5": 0.46, "R@10": 0.52, "R@20": 0.60, "R@50": 0.66, "Time (s)": 47.9, "Steps": 1.54},
|
| 11 |
+
{"Model": "qwen2.5-coder:3b", "Type": "Agent", "Hit Rate": 0.60, "MRR": 0.366, "R@1": 0.28, "R@5": 0.45, "R@10": 0.53, "R@20": 0.55, "R@50": 0.57, "Time (s)": 210.4, "Steps": 1.51},
|
| 12 |
+
{"Model": "qwen2.5-coder:14b", "Type": "Agent", "Hit Rate": 0.56, "MRR": 0.461, "R@1": 0.41, "R@5": 0.51, "R@10": 0.51, "R@20": 0.56, "R@50": 0.56, "Time (s)": 73.4, "Steps": 1.05},
|
| 13 |
+
{"Model": "Semantic (MiniLM-L6)", "Type": "Baseline", "Hit Rate": 0.54, "MRR": 0.279, "R@1": 0.22, "R@5": 0.32, "R@10": 0.38, "R@20": 0.52, "R@50": 0.54, "Time (s)": None, "Steps": None},
|
| 14 |
+
{"Model": "qwen2.5-coder:7b", "Type": "Agent", "Hit Rate": 0.54, "MRR": 0.311, "R@1": 0.26, "R@5": 0.36, "R@10": 0.40, "R@20": 0.52, "R@50": 0.54, "Time (s)": 59.3, "Steps": 0.84},
|
| 15 |
+
{"Model": "deepseek-coder:33b", "Type": "Agent", "Hit Rate": 0.12, "MRR": 0.087, "R@1": 0.08, "R@5": 0.08, "R@10": 0.12, "R@20": 0.12, "R@50": 0.12, "Time (s)": 180.4, "Steps": 0.14},
|
| 16 |
+
{"Model": "granite-code:34b", "Type": "Agent", "Hit Rate": 0.02, "MRR": 0.010, "R@1": 0.00, "R@5": 0.02, "R@10": 0.02, "R@20": 0.02, "R@50": 0.02, "Time (s)": 111.3, "Steps": 0.04},
|
| 17 |
+
]
|
| 18 |
+
|
| 19 |
+
# RAbench Results (500 queries)
|
| 20 |
+
rabench_data = [
|
| 21 |
+
{"Model": "Qwen3-Coder-30B-Q3_K_M", "Type": "Agent", "Hit Rate": 0.98, "MRR": 0.882, "R@1": 0.83, "R@5": 0.93, "R@10": 0.95, "R@20": 0.96, "R@50": 0.97, "Time (s)": 21.53, "Steps": 1.36},
|
| 22 |
+
]
|
| 23 |
+
|
| 24 |
+
# Ablation Study Data
|
| 25 |
+
ablation_data = [
|
| 26 |
+
{"Configuration": "Default (Full Agent)", "Queries": 500, "Hit Rate": 0.9818, "MRR": 0.8824, "R@1": 0.8381, "R@5": 0.9312, "Time (s)": 21.54},
|
| 27 |
+
{"Configuration": "With Filters & Offline", "Queries": 50, "Hit Rate": 0.9600, "MRR": 0.8485, "R@1": 0.7800, "R@5": 0.9000, "Time (s)": 22.76},
|
| 28 |
+
{"Configuration": "Offline Only", "Queries": 50, "Hit Rate": 0.9200, "MRR": 0.6476, "R@1": 0.5600, "R@5": 0.7400, "Time (s)": 41.45},
|
| 29 |
+
{"Configuration": "No Mentions", "Queries": 50, "Hit Rate": 0.6400, "MRR": 0.4316, "R@1": 0.3600, "R@5": 0.5200, "Time (s)": 38.35},
|
| 30 |
+
{"Configuration": "Online/Offline Mix", "Queries": 50, "Hit Rate": 0.6200, "MRR": 0.4595, "R@1": 0.4200, "R@5": 0.5000, "Time (s)": 38.50},
|
| 31 |
+
]
|
| 32 |
+
|
| 33 |
+
# Retrieval Baseline Ablations
|
| 34 |
+
baseline_ablation_data = [
|
| 35 |
+
{"Configuration": "BM25 Full", "Baseline": "bm25", "Structure": "full", "Hit Rate": 0.96, "MRR": 0.8629, "R@1": 0.80, "R@5": 0.92, "Time (s)": 33.75},
|
| 36 |
+
{"Configuration": "BM25 + Reranker", "Baseline": "bm25+reranker", "Structure": "full", "Hit Rate": 0.96, "MRR": 0.8692, "R@1": 0.80, "R@5": 0.94, "Time (s)": 935.07},
|
| 37 |
+
{"Configuration": "Hybrid Full", "Baseline": "hybrid", "Structure": "full", "Hit Rate": 0.96, "MRR": 0.8620, "R@1": 0.80, "R@5": 0.92, "Time (s)": 31.65},
|
| 38 |
+
{"Configuration": "Semantic Full", "Baseline": "semantic", "Structure": "full", "Hit Rate": 0.94, "MRR": 0.7097, "R@1": 0.62, "R@5": 0.88, "Time (s)": 31.28},
|
| 39 |
+
{"Configuration": "BM25 No Intent", "Baseline": "bm25", "Structure": "no_intent", "Hit Rate": 0.96, "MRR": 0.8554, "R@1": 0.80, "R@5": 0.92, "Time (s)": 31.47},
|
| 40 |
+
{"Configuration": "BM25 Minimal", "Baseline": "bm25", "Structure": "minimal", "Hit Rate": 0.96, "MRR": 0.8420, "R@1": 0.78, "R@5": 0.92, "Time (s)": 33.34},
|
| 41 |
+
]
|
| 42 |
+
|
| 43 |
+
# Dataset Statistics
|
| 44 |
+
dataset_stats = [
|
| 45 |
+
{"Conference": "ICLR", "Count": 12},
|
| 46 |
+
{"Conference": "NeurIPS", "Count": 39},
|
| 47 |
+
{"Conference": "ICML", "Count": 13},
|
| 48 |
+
{"Conference": "CVPR", "Count": 13},
|
| 49 |
+
{"Conference": "IROS", "Count": 25},
|
| 50 |
+
{"Conference": "ICRA", "Count": 25},
|
| 51 |
+
{"Conference": "AAAI", "Count": 5},
|
| 52 |
+
{"Conference": "ACL", "Count": 5},
|
| 53 |
+
{"Conference": "ICCV", "Count": 7},
|
| 54 |
+
{"Conference": "EMNLP", "Count": 4},
|
| 55 |
+
{"Conference": "Other", "Count": 144},
|
| 56 |
+
]
|
| 57 |
+
|
| 58 |
+
def create_retrieval_df():
|
| 59 |
+
df = pd.DataFrame(retrieval_data)
|
| 60 |
+
df = df.sort_values("MRR", ascending=False)
|
| 61 |
+
return df
|
| 62 |
+
|
| 63 |
+
def create_ablation_df():
|
| 64 |
+
return pd.DataFrame(ablation_data)
|
| 65 |
+
|
| 66 |
+
def create_baseline_ablation_df():
|
| 67 |
+
return pd.DataFrame(baseline_ablation_data)
|
| 68 |
+
|
| 69 |
+
def create_dataset_df():
|
| 70 |
+
return pd.DataFrame(dataset_stats)
|
| 71 |
+
|
| 72 |
+
def filter_by_type(model_type):
|
| 73 |
+
df = pd.DataFrame(retrieval_data)
|
| 74 |
+
if model_type != "All":
|
| 75 |
+
df = df[df["Type"] == model_type]
|
| 76 |
+
return df.sort_values("MRR", ascending=False)
|
| 77 |
+
|
| 78 |
+
with gr.Blocks(title="PC-Bench: Paper Discovery Benchmark") as demo:
|
| 79 |
+
gr.HTML("""
|
| 80 |
+
<div style="text-align: center; margin-bottom: 20px;">
|
| 81 |
+
<h1>PC-Bench: Paper Discovery Benchmark</h1>
|
| 82 |
+
<p style="color: #666;">Evaluating AI agents for academic paper retrieval and analysis</p>
|
| 83 |
+
<p>
|
| 84 |
+
<a href="https://github.com/MAXNORM8650/papercircle" target="_blank">
|
| 85 |
+
<img src="https://img.shields.io/badge/GitHub-Repository-blue?logo=github" alt="GitHub"/>
|
| 86 |
+
</a>
|
| 87 |
+
<img src="https://img.shields.io/badge/Papers-292-green" alt="Papers"/>
|
| 88 |
+
<img src="https://img.shields.io/badge/Queries-500+-orange" alt="Queries"/>
|
| 89 |
+
</p>
|
| 90 |
+
</div>
|
| 91 |
+
""")
|
| 92 |
+
|
| 93 |
+
with gr.Tabs():
|
| 94 |
+
with gr.TabItem("Model Leaderboard"):
|
| 95 |
+
gr.Markdown("### Multi-Agent Paper Retrieval (SemanticBench - 50 queries)")
|
| 96 |
+
gr.Markdown("Models ranked by Mean Reciprocal Rank (MRR). Higher is better.")
|
| 97 |
+
|
| 98 |
+
model_filter = gr.Dropdown(
|
| 99 |
+
choices=["All", "Agent", "Baseline"],
|
| 100 |
+
value="All",
|
| 101 |
+
label="Filter by Type"
|
| 102 |
+
)
|
| 103 |
+
|
| 104 |
+
leaderboard_table = gr.Dataframe(
|
| 105 |
+
value=create_retrieval_df(),
|
| 106 |
+
headers=["Model", "Type", "Hit Rate", "MRR", "R@1", "R@5", "R@10", "R@20", "R@50", "Time (s)", "Steps"],
|
| 107 |
+
interactive=False,
|
| 108 |
+
)
|
| 109 |
+
|
| 110 |
+
model_filter.change(
|
| 111 |
+
fn=filter_by_type,
|
| 112 |
+
inputs=[model_filter],
|
| 113 |
+
outputs=[leaderboard_table]
|
| 114 |
+
)
|
| 115 |
+
|
| 116 |
+
gr.Markdown("""
|
| 117 |
+
**Key Findings:**
|
| 118 |
+
- **Qwen3-Coder-30B** achieves best MRR (0.627) with 80% hit rate
|
| 119 |
+
- **BM25 baseline** remains competitive (78% hit rate, 0.541 MRR)
|
| 120 |
+
- Larger models (30B+) consistently outperform smaller variants
|
| 121 |
+
""")
|
| 122 |
+
|
| 123 |
+
with gr.TabItem("RAbench Results"):
|
| 124 |
+
gr.Markdown("### Extended Benchmark (RAbench - 500 queries)")
|
| 125 |
+
gr.Markdown("LLM-perturbed natural language queries")
|
| 126 |
+
|
| 127 |
+
gr.Dataframe(
|
| 128 |
+
value=pd.DataFrame(rabench_data),
|
| 129 |
+
headers=["Model", "Type", "Hit Rate", "MRR", "R@1", "R@5", "R@10", "R@20", "R@50", "Time (s)", "Steps"],
|
| 130 |
+
interactive=False,
|
| 131 |
+
)
|
| 132 |
+
|
| 133 |
+
gr.Markdown("""
|
| 134 |
+
**Observation:** RAbench shows higher performance than SemanticBench,
|
| 135 |
+
suggesting LLM-perturbed queries are easier for multi-agent retrieval.
|
| 136 |
+
""")
|
| 137 |
+
|
| 138 |
+
with gr.TabItem("Configuration Ablations"):
|
| 139 |
+
gr.Markdown("### Query Configuration Impact")
|
| 140 |
+
gr.Dataframe(
|
| 141 |
+
value=create_ablation_df(),
|
| 142 |
+
interactive=False,
|
| 143 |
+
)
|
| 144 |
+
|
| 145 |
+
gr.Markdown("### Retrieval Baseline Comparison")
|
| 146 |
+
gr.Dataframe(
|
| 147 |
+
value=create_baseline_ablation_df(),
|
| 148 |
+
interactive=False,
|
| 149 |
+
)
|
| 150 |
+
|
| 151 |
+
gr.Markdown("""
|
| 152 |
+
**Key Insights:**
|
| 153 |
+
- BM25 + Reranker achieves highest MRR (0.869) but is 28x slower
|
| 154 |
+
- No Intent configuration is fastest while maintaining 96% hit rate
|
| 155 |
+
- Semantic-only retrieval shows significant R@1 drop (0.62 vs 0.80)
|
| 156 |
+
""")
|
| 157 |
+
|
| 158 |
+
with gr.TabItem("Dataset"):
|
| 159 |
+
gr.Markdown("### Database Corpus Statistics")
|
| 160 |
+
gr.Markdown("Papers sourced from OpenReview across major ML/CS conferences")
|
| 161 |
+
|
| 162 |
+
gr.Dataframe(
|
| 163 |
+
value=create_dataset_df(),
|
| 164 |
+
interactive=False,
|
| 165 |
+
)
|
| 166 |
+
|
| 167 |
+
total = sum(d["Count"] for d in dataset_stats)
|
| 168 |
+
gr.Markdown(f"**Total Papers:** {total}")
|
| 169 |
+
|
| 170 |
+
gr.Markdown("""
|
| 171 |
+
---
|
| 172 |
+
### About
|
| 173 |
+
|
| 174 |
+
**Paper Circle** is a multi-agent research pipeline for intelligent paper discovery and analysis.
|
| 175 |
+
|
| 176 |
+
**Pipeline:** Query β Intent Agent β Search Agent β Sort Agent β Analysis Agent β Export
|
| 177 |
+
|
| 178 |
+
**Metrics:**
|
| 179 |
+
- **MRR** (Mean Reciprocal Rank): Ranking quality
|
| 180 |
+
- **R@K** (Recall at K): Found in top K results
|
| 181 |
+
- **Hit Rate**: Successful retrieval percentage
|
| 182 |
+
|
| 183 |
+
Built with [smolagents](https://github.com/huggingface/smolagents) and [LiteLLM](https://github.com/BerriAI/litellm)
|
| 184 |
+
""")
|
| 185 |
+
|
| 186 |
+
if __name__ == "__main__":
|
| 187 |
+
demo.launch()
|
requirements.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
gradio>=6.0.0
|
| 2 |
+
pandas>=2.0.0
|