Instructions to use HQSW/pairwise-aesthetic-supervision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use HQSW/pairwise-aesthetic-supervision with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Pairwise Aesthetic Supervision — Qwen3.5-2B LoRA Adapters
This repository contains the final LoRA adapters and evaluation predictions for Pairwise supervision for image aesthetic comparison. The study compares continued scalar-score supervision with pairwise aesthetic supervision under matched second-stage image exposure and optimizer-step budgets.
The strongest supported result is that pairwise supervision improves direct comparative decisions and positional robustness across both AVA-derived pairs and the independent Visual Aesthetic Benchmark (VAB). It does not consistently improve the underlying single-image scalar ranking measured on AVA.
Available adapters
All adapters use Qwen/Qwen3.5-2B at revision
15852e8c16360a2fea060d615a32b45270f8a8fc, with language-module LoRA
r=16, alpha=32, and dropout 0.05.
| Path | Training stage | Intended use |
|---|---|---|
adapters/seed_42/scalar_sft |
Scalar SFT | Single-image scoring baseline (B) |
adapters/seed_42/extra_scalar |
Scalar → Extra Scalar | Matched-budget scalar control (C) |
adapters/seed_42/pairwise |
Scalar → Pairwise SFT | Main comparative model (D) |
adapters/seed_123/* |
Same three stages, seed 123 | Stability analysis |
adapters/seed_2026/* |
Same three stages, seed 2026 | Stability analysis |
The seed-42 adapters are the checkpoints used for the reported AVA main experiment and VAB transfer evaluation. The seed-123 and seed-2026 adapters support the AVA training-seed analysis.
Main results
AVA, seed 42
| Model | Direct pair accuracy | Position consistency | Scalar-derived accuracy | SRCC | PLCC |
|---|---|---|---|---|---|
| Scalar SFT | 70.67% | 67.17% | 77.16% | 0.7422 | 0.7411 |
| Extra Scalar | 73.72% | 83.49% | 77.71% | 0.7508 | 0.7505 |
| Pairwise SFT | 77.08% | 95.19% | 77.14% | 0.7452 | 0.7469 |
Pairwise SFT improves direct accuracy over Extra Scalar by +3.36 percentage points, with a paired-bootstrap 95% CI of [+2.71, +4.04]. Across seeds 42, 123, and 2026, the improvements are +3.36, +5.48, and +3.99 points (mean +4.28, sample standard deviation 1.09 points). Scalar-derived accuracy does not improve across those seeds.
VAB zero-shot transfer, seed 42
| Model | Top-1 pass³ | Bottom-1 pass³ | TB-1 pass³ | Top-1 position consistency |
|---|---|---|---|---|
| Extra Scalar | 22.25% | 15.00% | 16.00% | 39.00% |
| Pairwise SFT | 29.25% | 25.50% | 18.00% | 47.75% |
For Pairwise minus Extra Scalar, Top-1 pass³ increases by +7.00 points (95% CI [+3.50, +10.50]) and Top-1 position consistency increases by +8.75 points (95% CI [+4.50, +13.00]). VAB is test-only: no VAB sample was used for training, prompt tuning, checkpoint selection, or threshold tuning.
Loading an adapter
Install versions compatible with Qwen3.5 and PEFT. The experiments used Transformers 5.5.4 and PEFT 0.18.1.
pip install "transformers>=5.5.4" "peft>=0.18.1" accelerate pillow
Load the main pairwise adapter directly from this repository:
import torch
from peft import PeftModel
from transformers import AutoProcessor, Qwen3_5ForConditionalGeneration
base_id = "Qwen/Qwen3.5-2B"
adapter_id = "HQSW/pairwise-aesthetic-supervision"
base = Qwen3_5ForConditionalGeneration.from_pretrained(
base_id,
revision="15852e8c16360a2fea060d615a32b45270f8a8fc",
torch_dtype=torch.bfloat16,
device_map="auto",
)
model = PeftModel.from_pretrained(
base,
adapter_id,
subfolder="adapters/seed_42/pairwise",
)
processor = AutoProcessor.from_pretrained(
base_id,
revision="15852e8c16360a2fea060d615a32b45270f8a8fc",
)
model.eval()
To use another checkpoint, change subfolder, for example to
adapters/seed_42/extra_scalar or adapters/seed_123/pairwise.
Direct pair inference
The AVA direct-comparison prompt is fixed to:
Which image is more aesthetically pleasing? Answer with A or B only.
The exact multi-image formatting, decoding, output parsing, position-swap evaluation, and VAB prompts are implemented in the associated GitHub repository. Running its evaluator is recommended because position labels must be remapped after image-order shuffling. Inference uses greedy decoding with thinking disabled, 65,536–262,144 image pixels, and at most 32 new tokens.
For single-image scalar scoring with the scalar or Extra Scalar adapter, use:
Rate the aesthetics of this image on a scale from 1 to 10. Reply only in this exact format with two decimal places: The score of this image is X.XX.
Repository contents
adapters/: nine final LoRA adapters across three seeds and three stages.configs/: frozen training and VAB evaluation configurations.results/ava/: final AVA predictions, metrics, multi-seed aggregation, and paired-bootstrap results.results/vab/: direct and scalar-derived VAB predictions plus official evaluator outputs.MANIFEST.sha256: SHA-256 checksum for every uploaded artifact.
Dataset images and base-model weights are intentionally excluded. Download AVA, VAB, and Qwen from their official sources and follow the data setup guide.
Limitations
- AVA pair labels are derived from MOS differences rather than independent human pairwise judgments.
- VAB contains 400 tasks, and only the seed-42 checkpoints were evaluated on VAB; the VAB numbers do not estimate training-seed variance.
- Pairwise and Extra Scalar stages match optimizer steps and image exposure, but differ in supervised-token count and task semantics.
- The evidence supports transferable comparative behavior and positional robustness. It is insufficient to claim a general improvement in aesthetic understanding or scalar aesthetic ranking.
License
The adapters and project code are released under Apache-2.0. AVA, VAB, Qwen, and other third-party resources remain subject to their own licenses and terms.
- Downloads last month
- -