Downloads · 30 days
0
rustambekurokov/bgc-setnet
bgc-setnet is a feature extraction model from rustambekurokov. Use it when you need embeddings to search or compare text. It is set up for pytorch. The card lists the license as other.
This repository contains the final five-seed model artifacts for the manuscript "Sequence-Derived Representations versus Pfam-Domain Content for Biosynthetic Gene Cluster Retrieval".
Downloads · 30 days
0
Access
Public
Updated Aug 21, 2026
Repo size
48.7 MB
Likes
0
Public
Click a slice to open those files.
.csv51.6 MB · 51%
From the Hugging Face model README
This repository contains the final five-seed model artifacts for the manuscript "Sequence-Derived Representations versus Pfam-Domain Content for Biosynthetic Gene Cluster Retrieval".
The release includes two model families:
pfam_setnet): a Set Transformer encoder over frozen ESM-2 gene embeddings, relative gene positions, padding masks, and a BGC-level Pfam inventory embedding.weighted_pfam_jaccard): learned non-negative Pfam-domain weights used in a weighted set-Jaccard retrieval baseline.The manuscript's main result is conservative: Pfam-domain content remains the strongest signal for this silver-label retrieval benchmark, while the ESM + BGC-SetNet + Pfam ensemble gives small, statistically unsupported gains on some secondary metrics.
checkpoints/
setnet/seed-20260810..20260814/
model.safetensors # verified model_state checkpoint
config.json
pfam_vocab.json
phase2_history.json
weighted_pfam/seed-20260810..20260814/
model.safetensors
config.json
pfam_vocab.json
phase2_history.json
evaluation/ # per-seed metadata, summaries, group/query outputs, alpha searches
results/dgx_final/ # aggregate manuscript result tables
source/ # source snapshot used for training/evaluation/provenance
provenance/checkpoint_manifest.json
Family means over five optimization seeds and 16 held-out MIBiG-reference groups:
| Method | Recall@50 | MRR | MAP | nDCG@50 |
|---|---|---|---|---|
| Raw ESM mean | 0.7946 | 0.2550 | 0.7251 | 0.8078 |
| BGC-SetNet + Pfam | 0.8472 | 0.2786 | 0.7771 | 0.8502 |
| Pfam Jaccard | 0.8788 | 0.3071 | 0.8480 | 0.9042 |
| ESM + BGC-SetNet + Pfam | 0.8769 | 0.3096 | 0.8503 | 0.9058 |
| Weighted Pfam Jaccard | 0.8789 | 0.3069 | 0.8477 | 0.9040 |
The weighted Pfam Recall@50 advantage over unweighted Pfam is numerically tiny (+0.00003) and should not be interpreted as a meaningful improvement.
All ten source checkpoints were verified by SHA-256 before conversion to clean model.safetensors files. The split file hash used by the final run is:
dc26fae17e54fd2ad41a9e10353b3da3e0aacf3144b64f6ee62e8341b4360555
See provenance/checkpoint_manifest.json for per-seed original checkpoint hashes, safetensors hashes, parameter counts, selected validation ensemble alpha, model config hashes, and split hashes.
import json
import torch
from safetensors.torch import load_file
from source.src.bgc_retrieval.model import ModelConfig, build_model
seed_dir = "checkpoints/setnet/seed-20260810"
config = json.load(open(f"{seed_dir}/config.json"))["model"]
model = build_model(ModelConfig.from_dict(config))
state = load_file(f"{seed_dir}/model.safetensors")
model.load_state_dict(state)
model.eval()
For pfam_setnet, inference expects:
gene_embeddings: [batch, genes, 1280] frozen ESM-2 gene embeddingsrelative_positions: [batch, genes] normalized gene positionspadding_mask: [batch, genes] boolean padding maskpfam_tokens: [batch, domains] Pfam IDs encoded with pfam_vocab.json (0 = padding, 1 = unknown)For weighted_pfam_jaccard, inference expects only pfam_tokens and returns learned domain weights; pairwise retrieval scores are computed with the model's pairwise_jaccard method.
These models are research artifacts for reproducing and auditing BGC retrieval experiments from the associated manuscript. They are not validated for clinical, diagnostic, regulatory, or production biological decision-making.
Citation metadata will be updated after the preprint is posted. For now, cite the manuscript title above and this Hugging Face repository.