All notable changes to this project are documented in this file. This project adheres to Semantic Versioning.
- Installable Python library
graphcodebert_interpretabilitywith a clean, documented public API (compare,token_alignment,saliency,project,similarity_matrix,embed, baselines, datasets,set_seed, ...) that works on any code, not just the bundled examples. gcbicommand-line interface:compare,saliency,project,heatmap,report, andreproduce.- Model-agnostic model loading (
load_model) with caching - supports GraphCodeBERT, CodeBERT, UniXcoder and other compatible checkpoints. - Automated benchmark reports:
generate_reportemits a Markdown table, abooktabsLaTeX table and a 300-DPI comparison figure across GraphCodeBERT, AST and TF-IDF lenses. - Dataset loaders: bundled
sortingcorpus plusload_snippets_from_dirandload_jsonlfor user-provided code. pytesttest suite (40+ fast tests, no model download required) and GitHub Actions CI (lint + tests on Python 3.9-3.12, plus a build job).pyproject.tomlpackaging with optional extras ([model],[umap],[full],[dev]) and a.gitignore.
- The nine analysis scripts (
comparison.py,heatmap.py,pca.py,tsne.py,pumap.py,saliency_maps.py,ablation.py,ast-s.py,tf-s.py) are now thin wrappers over the library, eliminating the per-script duplication of the sorting-algorithm corpus and the model-loading boilerplate. - README rewritten around the library and CLI, with installation, API quickstart, capability matrix and SEO-friendly headings.
- Stronger, centralised determinism via
set_seed(Python, NumPy, PyTorch).
- Comprehensive README overhaul with expanded methodology, usage, results, and citation guidance.
requirements.txtfor reproducible environment setup.CONTRIBUTING.mdwith contribution and coding-style guidance.docs/REPRODUCIBILITY.mdwith end-to-end reproduction steps, runtimes, and determinism notes.examples/demo_similarity.ipynbnotebook with an Open in Colab badge.- GitHub issue templates for bug reports and feature requests.
- Initial publication of GraphCodeBERT interpretability scripts and generated visualizations.
- MIT licensing and citation metadata.