/ Модель

Характеристики

Лицензия
MIT
Архитектура
fga · dense
Библиотека
transformers
Опубликована
26 июл 2026

fga-ndcg

Вопросы по изображениюИзображение, текст → текст3 профессии

Дообученная модель FGA ранжирует ответы в визуальном диалоге по градуированной релевантности, оптимизируя NDCG.

7скачиваний за 30 дней0лайковвеса обновлены26 июл 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Idan/fga-ndcg — модель Factor Graph Attention, разработанная на основе подхода FGA из работы CVPR 2019 и дообученная автором на плотных оценках релевантности для визуального диалога. Она принимает изображение и историю диалога с вопросом, а затем ранжирует 100 предложенных ответов; обучение оптимизирует NDCG, учитывая градации релевантности, выставленные пятью аннотаторами.

Модель основана на архитектуре FGA для визуального диалога и рассчитана на набор VisDial v1.0. На валидационной выборке автор сообщает NDCG 69,07; компромисс этой настройки — MRR 49,03, ниже, чем у варианта, обученного на разреженных метках. Репозиторий содержит веса Safetensors и указывает библиотеку Transformers. Лицензия — MIT.

Сценарии применения

  • ранжирование предложенных ответов на вопрос об изображении
  • оценка релевантности ответов в многошаговом диалоге об изображении
  • поиск наиболее подходящего ответа среди кандидатов в VisDial

Ограничения

Оптимизация NDCG снижает MRR относительно варианта FGA, обученного на разреженных метках; качество показано на VisDial v1.0 и не подтверждает пригодность для иных наборов или сценариев.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Factor Graph Attention — NDCG variant

  • A general multimodal attention approach inspired by probabilistic graphical models.
  • Achieves a state-of-the-art performance (MRR) on visual dialog task.

This is Factor Graph Attention (CVPR'19) finetuned on the dense relevance annotations, which optimizes NDCG. Code: idansc/fga.

For the MRR-oriented model, see Idan/fga.

Why there are two models

The sparse training label calls one of the 100 candidates correct and the other 99 equally wrong. That is what MRR measures. But for "is it daytime?" the candidate list contains yes, yeah, it is and yes it is, and the label picks one arbitrarily. NDCG instead scores against the graded relevance five annotators assigned to every candidate.

Training on the graded signal moves NDCG a long way and costs MRR, because the two metrics genuinely disagree about what a good ranking is. That tension is the subject of the 2020 challenge submission, https://github.com/idansc/mrr-ndcg.

Results

On VisDial v1.0 val. The baseline is the MRR model this was finetuned from:

ModelNDCGMRRR@1R@5R@10Mean rank
Idan/fga (sparse)56.4666.0152.4682.9590.973.92
This model (dense only)69.0749.0334.2766.1580.136.68
dense + sparse, weight 0.568.0061.9349.5576.5986.145.07
dense + sparse, weight 1.066.6163.2750.6978.3387.384.78

This checkpoint is the pure-dense end of that trade-off: the best NDCG, and the worst MRR. If you want one model that is respectable at both, the sparse_weight=1.0 row gives up 2.5 NDCG to recover 14 MRR, and is reproducible with --sparse_weight 1.0.

Trained for 5 epochs at lr 1e-4 on the 2,000-image dense subset of train. The val annotations are never trained on — they are the evaluation set.

On the objective

The loss is a soft-label cross entropy: the relevance vector is normalized into a distribution and matched against the model's log-softmax over the candidates,

loss = -sum_i p_i log q_i,     p = relevance / sum(relevance)

which is the cross entropy the sparse loss already computes, generalized from a one-hot target to a graded one.

A smooth approximation of NDCG itself (ApproxNDCG, Qin et al.) was also tried and is implemented in the repo. It is worse on this task — +6.0 NDCG against +12.6, while losing more MRR — most likely because it concentrates its gradient on the few positions the discount rewards, whereas the soft cross entropy draws signal from all 100 candidates, which matters when there are only 2,000 training examples.

Usage

from fga import FGAForVisualDialog

model = FGAForVisualDialog.from_pretrained("Idan/fga-ndcg")
outputs = model(**batch)
ranking = outputs.logits.argsort(dim=-1, descending=True)

Install with pip install git+https://github.com/idansc/fga.git.

Reproduce with:

python scripts/finetune_dense.py \
    --model_name_or_path <sparse checkpoint> \
    --train_dense_path data/visdial_1.0_train_dense_annotations.json \
    --output_dir models/fga-ndcg \
    --loss soft_ce --sparse_weight 0.0 \
    --learning_rate 1e-4 --num_train_epochs 5

Citation

Please cite Factor Graph Attention if you use this work in your research:

@inproceedings{schwartz2019factor,
  title={Factor graph attention},
  author={Schwartz, Idan and Yu, Seunghak and Hazan, Tamir and Schwing, Alexander G},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
  pages={2039--2048},
  year={2019}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Нельзя запустить

Архитектура fga неизвестна transformers в образе рантайма.

Класс архитектуры
FGAForVisualDialog
Ревизия весов
78518b2

0 моделей