The ensemble approach averages predictions from all 5 seeds and achieves the best performance:
import torch
from huggingface_hub import hf_hub_download
from libribrain_experiments.models.configurable_modules.classification_module import (
ClassificationModule,
)
# Choose device
device = torch.device("cuda"if torch.cuda.is_available() else"cpu")
# Load all available seeds (as in the paper)
seeds = [7, 18, 17, 1, 2]
models = []
for seed in seeds:
checkpoint_path = hf_hub_download(
repo_id="zuazo/megconformer-phoneme-classification",
filename=f"seed-{seed}/pytorch_model.ckpt",
)
model = ClassificationModule.load_from_checkpoint(
checkpoint_path, map_location=device
)
model.eval().to(device)
models.append(model)
# Example MEG input: (batch=1, channels=306, time=125)
meg_signal = torch.randn(1, 306, 125, device=device)
with torch.no_grad():
probs_list = []
preds_list = []
for model in models:
logits = model(meg_signal) # (1, C)
probs = torch.softmax(logits, dim=1) # (1, C)
probs_list.append(probs)
preds_list.append(probs.argmax(dim=1)) # (1,)# Stack predictions from all models: shape (num_models, batch_size)
preds = torch.stack(preds_list, dim=0) # (M, 1)# We have a single example in the batch, so index 0
per_model_preds = preds[:, 0] # (M,)
num_classes = probs_list[0].size(1)
# Count votes per class
votes = torch.bincount(per_model_preds, minlength=num_classes).float()
# Majority-vote class (ties resolved by smallest index)
majority_class = int(votes.argmax().item())
# "Confidence" = fraction of models voting for the chosen class
confidence = (votes[majority_class] / votes.sum()).item()
print(f"Ensemble (majority vote) predicted phoneme class: {majority_class}")
print(f"Vote share for that class: {confidence:.2%}")
Grouping
: 100 single-trial examples averaged per training sample
Reproducibility
All 5 random seeds are provided. For best results on new data, we recommend using the ensemble approach, which achieved
65.8% F1-macro
on the competition holdout set.
Citation
@misc{dezuazo2025megconformerconformerbasedmegdecoder,
title={MEGConformer: Conformer-Based MEG Decoder for Robust Speech and Phoneme Classification},
author={Xabier de Zuazo and Ibon Saratxaga and Eva Navas},
year={2025},
eprint={2512.01443},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2512.01443},
}
megconformer-phoneme-classification huggingface.co is an AI model on huggingface.co that provides megconformer-phoneme-classification's model effect (), which can be used instantly with this zuazo megconformer-phoneme-classification model. huggingface.co supports a free trial of the megconformer-phoneme-classification model, and also provides paid use of the megconformer-phoneme-classification. Support call megconformer-phoneme-classification model through api, including Node.js, Python, http.
megconformer-phoneme-classification huggingface.co is an online trial and call api platform, which integrates megconformer-phoneme-classification's modeling effects, including api services, and provides a free online trial of megconformer-phoneme-classification, you can try megconformer-phoneme-classification online for free by clicking the link below.
zuazo megconformer-phoneme-classification online free url in huggingface.co:
megconformer-phoneme-classification is an open source model from GitHub that offers a free installation service, and any user can find megconformer-phoneme-classification on GitHub to install. At the same time, huggingface.co provides the effect of megconformer-phoneme-classification install, users can directly use megconformer-phoneme-classification installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
megconformer-phoneme-classification install url in huggingface.co: