From ranking and feedback control to preference alignment and multimodal generative-model post-training
Jingxi Duan · Project status · Talking-head research · Run the demo · I2V research
This repository studies one recurring problem across different ML systems:
How can an offline model be turned into a measurable decision policy, and how do we detect when the optimization target stops matching the real objective?
The projects progress through two connected tracks:
- Prediction, control, and preference learning — multi-task ranking, auction control, reward modeling, and DPO data construction.
- Reward-guided generative post-training — image reward post-training, talking-head motion, and image-to-video stability research.
Every reported number is backed by an artifact in the corresponding project. Negative results and rejected gates are kept alongside successful runs.
For an on-policy intermediate state
The stabilized video fit removes the original unbounded negative-target repulsion:
Full derivation and implementation boundaries: 08 · METHOD.md.
| Base MP4 · Calibrated policy MP4 | Base MP4 · Calibrated policy MP4 |
These portraits are newly extracted from two 4K Pexels License videos and were not used for training or calibration. Both columns use matched portrait, held-out audio, generation seed, and frozen renderer; only the motion adapter changes. Judge expression/head-motion behavior here—not color or skin detail, which are controlled by the same frozen LivePortrait renderer. Sources and checksums.
| Metric | Base | Candidate | Candidate−Base mean [95% CI] |
|---|---|---|---|
| Appeal | 0.7146 | 0.7104 | -0.0042 [-0.0062, -0.0024] |
| Naturalness | 0.9434 | 0.9429 | -0.0005 [-0.0031, +0.0013] |
| Dynamic degree | 0.4858 | 0.4779 | -0.0079 [-0.0115, -0.0048] |
Metrics with a favorable 95% interval excluding zero: none.
Base MP4 · Candidate MP4 | Base MP4 · Candidate MP4 |
Base MP4 · Candidate MP4 | Base MP4 · Candidate MP4 |
Base MP4 · Candidate MP4 | Base MP4 · Candidate MP4 |
The six demos are fixed indices 0–5 from a 40-pair COCO-validation set not used for training or checkpoint selection. Base and the stability candidate use identical first frame, caption, and generation seed. V4 operation record.
The saved V4 checkpoints were evaluated post hoc, without retraining. For temporal LoRA modules:
At inference scale 0.05, the effective update ratio 5.12e-5 at step 50 to 1.51e-3 at step 1000 and 1.97e-3 at step 2000. A paired diagnostic video score also showed condition-dependent effects: step 500 / scale 0.01 had mean 0.01 had +0.00229 on six development pairs. The 40-pair step-1000 / scale-0.05 confirmation had [-0.00384, +0.00586]. This supports a measurable, low-scale visual effect, but not a statistically established generalized improvement.
Full quantitative report · Development sweep
| # | Project | Problem and contribution | Verified result | Status |
|---|---|---|---|---|
| 01 | multitask-ctr-cvr-rec |
Multi-task CTR/CVR ranking with shared RankMixer-style feature interaction and clicked-sample masking for CVR. | CTR AUC 0.8805, GAUC 0.8796; CVR AUC 0.7960 on proxy labels derived from MovieLens-1M. | Complete |
| 02 | rtb-bid-shading-control |
Combines pCTR, a win-rate model, candidate-bid search, and PID/MPC feedback control in a second-price auction simulator. | Avazu pCTR AUC 0.7796; PID profit 5,557 vs fixed-policy 2,678 under the documented simulation. | Complete |
| 03 | reward-model-dpo-pipeline |
Preference filtering, proxy LLM judging, Bradley–Terry reward modeling, DPO-format export, and an end-to-end trainer smoke test. | Held-out RM AUC 0.6150, pairwise accuracy 0.6317; 2,624 DPO training pairs. The included DPO run is a 20-step smoke test, not a quality claim. | Complete pipeline |
| 04 | diffusion-opsd-mps |
Image reward post-training on SDXL-Turbo, separated into environment/scene and portrait domains with a pinned, leakage-audited protocol. | Scenes: independent CLIP-H semantic delta +0.146 with quality-margin delta +0.534 [95% CI +0.258, +0.805]; portraits: semantic -0.099 with quality-margin delta +1.043 [95% CI +0.772, +1.336] on 40 prompts × 3 seeds. Quality direction improves on both domains; no human-preference claim. | Image post-training study |
| 06 | Reserved research slot | No public project is assigned to this number. It remains visible so the repository history is not presented as a continuous series that never existed. | No result claimed. | Reserved |
| 07 | talking-head-motion-opsd |
Retargets OPSD from a single visual-preference image reward to a measured, real-speaker motion-target domain on JoyVASA's 73-dimensional audio-to-motion trajectories, with a bounded motion reward, two diagnosed-and-fixed reward-design bugs, and a real-video behavior-cloning path. | Calibrated expression seeds reduce paired target error from 0.1202 to 0.0229–0.0238 and pass n=40 SyncNet non-inferiority. Failed gates and open questions are detailed in the project's Limitations. | Flagship, active |
| 08 | video-opsd-i2v |
Extends OPSD's reward-guided fine-tuning — originally single-image pixel diffusion only — to DynamiCrafter's video temporal-LoRA modules, with a new differentiable video reward, reward-hacking diagnosis, and a gradient-clipped anchored-fit objective that fixes a training divergence. | The gradient-controlled anchored fit completed 2,000 guarded steps with zero guard trips; saved checkpoints show a quantified, increasing effective LoRA update and a positive diagnostic visual effect at low inference scale. Confirmatory-evaluation scope is detailed in the project's Limitations. | Flagship, stabilized + quantified effect |
04 · image reward post-training
| scenes + portraits, leakage audit + independent evaluation
|
+-- 07 · audio-to-motion post-training
| measured human targets + behavior cloning + avatar evaluation
|
+-- 08 · image-to-video post-training
temporal LoRA + video rewards + reward-hacking and stability diagnosis
The optimization loop is deliberately held recognizable across projects: on-policy query states, reward-gradient positive/negative targets, detached finite-step fitting, and a slowly refreshed behavior policy. The research contribution of each extension is therefore not presented as a new optimizer. It lies in the domain-specific state representation, reward design, conditioning path, failure diagnosis, and evaluation protocol.
- New domain transfer of OPSD: retargets DiffusionOPSD's query/target/EMA optimization structure from a single visual-preference image reward onto a 73-coefficient audio-to-motion trajectory space (frozen JoyVASA + LivePortrait; LoRA updates only the motion DiT).
- New measured reward targets: per-industry amplitude, jitter, and blink bands estimated from real speaker footage replace a hand-tuned visual-preference reward.
- Diagnosed and fixed two reward-design bugs: a monotone amplitude reward causing 2.4–2.7× overshoot, fixed with a peaked Gaussian target; an excessive blink target causing half-closed eyes, fixed by retuning.
- Added real-video behavior cloning: 1,753 aligned four-second motion windows supplement the reward signal via an auxiliary supervised objective.
- Verified result: three trained policies reach 0.85–0.89× their measured amplitude targets on held-out speakers; the calibrated expression policy cuts mean held-out target error from 0.1202 to 0.0229–0.0238 across three seeds (n=40 paired clips, all 95% CIs exclude zero), and all three seeds pass the frozen n=40 SyncNet non-inferiority margin.
Failed gates, sample sizes, and open questions are in 07-talking-head-motion-opsd's Limitations section.
Start with the technical report, separability analysis, and current experiment record.
- New video extension of OPSD:
DiffusionOPSDonly ever optimized a single frozen text-to-image backbone against one scalar image reward. This project retargets its reward-guided fine-tuning onto DynamiCrafter's 136 temporal-attention LoRA modules, with a first-frame-conditioned state and a new differentiable video reward (subject consistency, optical-flow dynamics, motion smoothness, pixel-naturalness). - Diagnosed and fixed reward hacking: full-strength reward-aligned LoRA amplified saturation, overexposure, and edge artifacts; a smooth sigmoid naturalness penalty replaced the original hard-clamped formulation, keeping the training gradient active throughout the run.
- Diagnosed and fixed a long-run divergence: an anchored-fit objective with effective
1e-3gradient clipping completed a full 2,000-step guarded run with zero guard trips. - Quantified the trained effect: a post-hoc analysis of saved checkpoints and rendered videos shows a measurable, increasing effective LoRA update ratio and a positive diagnostic visual effect at low inference scale and mid-training checkpoints.
Sample sizes, confirmatory-evaluation scope, and open questions are in 08-video-opsd-i2v's Limitations section.
Start with the method, long-run results, and gate log.
Each active generative project separates four kinds of evidence:
| Evidence | What it can establish | What it cannot establish |
|---|---|---|
| Training reward and gradient diagnostics | Whether the intended optimization signal exists and changes | Perceptual quality or generalization |
| Held-out automatic metrics | Repeatable changes under a fixed evaluator | Human preference when evaluator and reward are related |
| Controlled qualitative comparisons | Visible failure modes under matched inputs and seeds | Population-level significance |
| Blind human evaluation | Perceived preference under the stated protocol | Production reliability without deployment evidence |
Training optimizations are launched through tools/train_guard.py. Each run records its configuration, logs, checkpoint state, gate result, and failure reason in Markdown before the next experiment begins. Small artifacts are committed to main; large media are retained on the documented backup branch when available.
The remaining perceptual question is packaged as an executable 80-trial blind A/B study: 40 matched Base/calibrated-policy talking-head pairs and 40 matched Base/stability-candidate I2V pairs. Candidate placement is exactly balanced within each project, trial order and filenames are anonymized, and the private answer key is excluded from Git.
- Study protocol and local UI
- Builder:
tools/build_blind_study.py - Scorer:
tools/score_blind_study.py
No human-preference number is claimed yet. Real participant CSV files are required before the scorer can produce a publishable result.
Clone the actual repository name, then use the project-local environment and instructions:
git clone https://github.com/jingxiduan/ml-portfolio.git
cd ml-portfolio
# Example: CPU-scale ranking project
cd 01-multitask-ctr-cvr-rec
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python src/download_data.py
python src/preprocess.py
python src/train.py --epochs 4 --batch_size 4096The projects intentionally do not share one environment: 01–03 are lightweight CPU workflows, 04–05 target Apple MPS, and 07–08 require separate model weights and GPU-specific setup. Use each project's README.md rather than installing all dependencies together.
ml-portfolio/
├── 01-multitask-ctr-cvr-rec/ ranking and multi-task learning
├── 02-rtb-bid-shading-control/ auction modeling and feedback control
├── 03-reward-model-dpo-pipeline/ preference and alignment pipeline
├── 04-diffusion-opsd-mps/ scene + portrait image post-training
├── 06 reserved; no public project
├── 07-talking-head-motion-opsd/ audio-driven avatar motion
├── 08-video-opsd-i2v/ image-to-video reward post-training
├── tools/ shared training guard and backup helpers
└── PROJECT_STATUS.md current state and roadmap
This is a personal research portfolio built from public datasets and open-source model components. It does not claim production deployment, foundation-model pretraining, or ownership of the referenced base models. Dataset and model licensing constraints are documented inside the relevant projects.