Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
---
|
| 3 |
+
tags:
|
| 4 |
+
- code-search
|
| 5 |
+
- pytorch
|
| 6 |
+
- gnn
|
| 7 |
+
- procedural-similarity
|
| 8 |
+
datasets:
|
| 9 |
+
- google/code_x_glue_cc_clone_detection_poj104
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Procedural Code Search (GIN + CodeBERT)
|
| 13 |
+
|
| 14 |
+
This model was trained to identify **procedural similarity** in C++ code (POJ-104 dataset).
|
| 15 |
+
Unlike semantic models that focus on intent ("what it does"), this model focuses on structure ("how it does it").
|
| 16 |
+
|
| 17 |
+
## Architecture
|
| 18 |
+
- **Backbone:** Frozen CodeBERT (microsoft/codebert-base) for node features.
|
| 19 |
+
- **Head:** 2-layer GIN (Graph Isomorphism Network) for structural aggregation.
|
| 20 |
+
- **Objective:** Triplet Margin Loss (Margin=0.8) to separate structurally distinct implementations.
|
| 21 |
+
|
| 22 |
+
## Usage
|
| 23 |
+
This is a custom PyTorch model. You must define the `CFGEncoder` class structure exactly as used in training to load these weights.
|