/ Модель

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

Лицензия
MIT
Базовая модель
vit-base-patch16-224
Библиотека
pytorch
Опубликована
21 июл 2026

knowledge-guided-vqa-models

Вопросы по изображениюИзображение, текст → текст3 профессии
0скачиваний за 30 дней0лайковвеса обновлены16 окт 2026

Описание модели

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

Набор моделей ViT, CLIP и FLAN-T5 для ответов на вопросы по изображениям с использованием внешних знаний и сравнением способов интеграции подсказок.

Набор обученных контрольных точек для визуального ответа на вопросы (VQA), разработанный автором репозитория для экспериментов на расширенной подвыборке OK-VQA. Архитектура объединяет Vision Transformer ViT-Base с разрешением 224×224, текстовый энкодер CLIP ViT-Base и генератор ответов FLAN-T5-Small. Доступны варианты без внешних подсказок, с поздним объединением признаков и с внедрением подсказок в механизмы внимания ViT; подсказки включают визуальные ориентиры, отвлекающие элементы и внешние знания, подготовленные с помощью Llama 3.3 70B.

Модель предназначена для ответов на вопросы о содержимом изображений, особенно когда ответ требует внешних знаний. В описанном эксперименте вариант с поздним объединением достиг 39,44% exact match на валидационной части расширенной и отфильтрованной подвыборки OK-VQA; это не результат официального полного бенчмарка. Репозиторий содержит веса PyTorch, для загрузки которых нужны совместимая архитектура и соответствующие предобученные компоненты. Лицензия репозитория — MIT; для предобученных компонентов действуют их собственные лицензии и условия.

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

  • ответы на вопросы о содержимом изображений
  • ответы на вопросы по изображениям, требующие внешних знаний
  • сравнение позднего объединения признаков и внедрения знаний во внимание
  • эксперименты с VQA на подвыборке OK-VQA

Ограничения

Оценка относится к валидационной части расширенной отфильтрованной подвыборки OK-VQA, а не к полному официальному бенчмарку; результаты могут отличаться на других данных и режимах обучения. Для воспроизводимого запуска нужны совместимая реализация и предобученные компоненты, а их лицензии и условия могут отличаться от MIT.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

Открыть на Hugging Face

Knowledge-Guided Visual Question Answering Models

This repository contains trained model checkpoints for Knowledge-Guided Visual Question Answering (VQA) on an augmented subset of the OK-VQA dataset.

📄 Research paper: Rethinking LLM-Guided Visual Question Answering: Does Deeper Knowledge Integration Really Help?

The paper investigates whether deeper integration of LLM-generated knowledge improves VQA performance under data-scarce fine-tuning conditions. We compare decision-level late fusion with attention-matrix injection using a shared ViT + FLAN-T5 framework.

Research Highlights

  • Compare shallow, decision-level late fusion against deep attention injection.
  • Generate structured guidance with Llama 3.3 70B.
  • Encode guidance using a CLIP text encoder.
  • Expand the filtered training set from 3,144 to approximately 36,000 samples through question paraphrasing.
  • Evaluate the baseline, late fusion, and attention injection using a consistent experimental setup.

The results show that late fusion performs better than attention injection in this data-scarce experimental setting. This does not imply that deeper integration is always inferior.

Architecture

ComponentModel
Vision encodergoogle/vit-base-patch16-224
Guidance text encoderopenai/clip-vit-base-patch16
Answer generation modelgoogle/flan-t5-small
BenchmarkOK-VQA
LLM used to generate guidanceLlama 3.3 70B

The pipeline generates structured guidance containing visual focus concepts, distractor elements to ignore, and external knowledge statements. A CLIP text encoder represents this guidance as an embedding used by the downstream VQA model.

Integration strategies

1. Baseline — No Guidance

Uses visual features and question representations without external LLM-generated guidance.

2. Late Fusion — Shallow Integration

Combines the global ViT representation with the encoded guidance immediately before answer decoding. The visual feature extraction itself is left unchanged.

3. Attention Injection — Deep Integration

Injects guidance into the query and key projections of the last six ViT layers, modifying visual attention.

Available Checkpoints

CheckpointStrategyApproximate file size
best_baseline_model.pthNo guidance309 MB
best_fusion_model.pthLate fusion313 MB
best_attention_model.pthAttention injection325 MB

These files contain trained checkpoint weights. Loading them requires the matching model architecture and compatible pretrained components.

Evaluation Results

The following scores are reported in the paper for the validation split of the augmented, top-500-filtered OK-VQA subset. These are not official full-benchmark OK-VQA leaderboard scores.

StrategyExact Match (%)Edit Similarity (%)Token F1 (%)BERTScore
Baseline — No Guidance29.4440.5730.9791.21
Late Fusion39.4448.9741.3492.14
Attention Injection31.8042.6633.3391.00

Main finding

Late fusion achieves 39.44% exact match, a 10.00-percentage-point improvement over the baseline. Attention injection achieves 31.80%, a 2.36-point improvement over the baseline.

These results suggest that, with limited fine-tuning data and largely frozen pretrained components, simpler knowledge integration can be more effective than modifying visual attention.

Training Details

  • Dataset: Filtered OK-VQA training data with the top 500 answer classes.
  • Data augmentation: LLM-based question paraphrasing.
  • Original filtered training set: 3,144 samples.
  • Augmented training set: Approximately 36,000 samples.
  • Optimizer: Adam.
  • Learning rate: 3e-5.
  • Batch size: 8–16.
  • Maximum epochs: 15.
  • Early stopping: Validation exact match, patience 3–4.
  • Evaluation metrics: Exact Match, Edit Similarity, Token F1, and BERTScore.

The ViT and CLIP encoders remain frozen except for the explicitly modified and trainable components of the attention-injection strategy.

Usage

You can download a checkpoint from this repository with huggingface_hub:

from huggingface_hub import hf_hub_download

checkpoint_path = hf_hub_download(
    repo_id="rishii100/knowledge-guided-vqa-models",
    filename="best_fusion_model.pth",
)

print("Checkpoint downloaded to:", checkpoint_path)

To run inference, instantiate the matching model class and load the checkpoint:

import torch

# YourLateFusionModel is a placeholder for the exact model class
# used during training. It must match the checkpoint's architecture.
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = YourLateFusionModel().to(device)

state_dict = torch.load(
    checkpoint_path,
    map_location=device,
    weights_only=True,
)
model.load_state_dict(state_dict)
model.eval()

Important: YourLateFusionModel is a placeholder, not an included implementation. The model class, forward pass, tokenizer configuration, and pretrained components must match the training implementation. The checkpoint alone is not a complete, standalone inference pipeline.

Limitations

  • Results are based on the experimental subset and validation protocol described in the paper.
  • Performance may differ on the full official OK-VQA benchmark or under different training-data regimes.
  • Attention injection can help some question categories while harming others.
  • The checkpoint files do not, by themselves, provide the complete training pipeline or guarantee reproducibility without the corresponding implementation and configuration.
  • The pretrained components retain their respective upstream licenses and terms.

Paper and Citation

Title: Rethinking LLM-Guided Visual Question Answering: Does Deeper Knowledge Integration Really Help?

Authors: Aneerban Saha, Vijay Kumar, Sameer Madhav D., Priyam Srivastava, and Dhruv Bansal.

Conference: Accepted at ADCIS 2026.

arXiv: 2610.17079

BibTeX

@misc{saha2026rethinkingvqa,
  title         = {Rethinking LLM-Guided Visual Question Answering: Does Deeper Knowledge Integration Really Help?},
  author        = {Saha, Aneerban and Kumar, Vijay and Madhav D., Sameer and Srivastava, Priyam and Bansal, Dhruv},
  year          = {2026},
  eprint        = {2610.17079},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CV},
  url           = {https://arxiv.org/abs/2610.17079}
}

License

This repository is marked as MIT licensed.

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

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

GPU в ailist

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

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

В репозитории нет config.json: не понять архитектуру модели.

Ревизия весов
d2b1902

0 моделей