Skip to content
wkim97Public

About

AdKnob: Ad Intensity Control and Labeling for LLM-Native Advertising (NeurIPS 2026)

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

AdKnob: Ad Intensity Control and Labeling for LLM-Native Advertising

NeurIPS 2026

Woo Jae Kim, Seongho Keum, Joonsung Jeon, Suhyeon Ha, Sooel Son†, Sung-eui Yoon†

School of Computing, KAIST    †Co-corresponding authors

Paper | Project Page | Interactive Demo | Dataset | Models

AdKnob overview

Overview

AdKnob is a framework for LLM-native advertising that addresses two challenges together:

  • Ad intensity control: new ad control tokens ([AD_LV_1] ... [AD_LV_4]) with no pretrained semantics, aligned via direct preference optimization (DPO), let a single model generate responses at a desired ad intensity.
  • Ad labeling: an attention rollout-based attribution mechanism, supervised by an ad-attribution loss, identifies ad segments in the response with no additional inference cost.

We also construct MI-KnobSet, the first multi-level ad intensity preference dataset for LLM-native ads.

Installation

git clone https://github.com/wkim97/AdKnob.git && cd AdKnob
pip install -r requirements.txt

or

docker build -t adknob .
docker run --gpus all -it -v $PWD:/workspace/AdKnob adknob bash

MI-KnobSet

from datasets import load_dataset

pairs = load_dataset("wkim97/MI-KnobSet", "pairs", split="train")
test = load_dataset("wkim97/MI-KnobSet", "test", split="test")
candidates = load_dataset("wkim97/MI-KnobSet", "candidates", split="train")
Config Split Size Fields
pairs train 47,352 level, brand, ad_copy, user_prompt, chosen, rejected, rejection_criterion, delta, delta_offsets
test test 913 brand, ad_copy, user_prompt, reference_response
candidates train 3,946 25 scored candidate responses per request

MI-KnobSet is built on the Webis Generated Native Ads 2024 dataset.

Checkpoints

Base model Checkpoint
Qwen3-4B-Instruct-2507 wkim97/Qwen3-4B-AdKnob
Phi-4-mini-instruct wkim97/Phi-4-mini-AdKnob
Llama-3.2-3B-Instruct wkim97/Llama-3.2-3B-AdKnob
Llama-3.1-8B-Instruct wkim97/Llama-3.1-8B-AdKnob
Qwen2.5-14B-Instruct wkim97/Qwen2.5-14B-AdKnob
Phi-4 wkim97/Phi-4-AdKnob
import torch
from adknob.data import encode_prompt
from adknob.modeling import load_model
from adknob.rollout import TAU, label_response

model, tok = load_model("wkim97/Qwen3-4B-AdKnob")
brand, ad_copy = "Wells Fargo", "Comprehensive digital banking solutions for diverse financial needs."
question = "What are the main services and features available through online banking"
level = 3

ids, _ = encode_prompt(tok, brand, ad_copy, question, level)
x = torch.tensor([ids], device=model.device)
out = model.generate(x, attention_mask=torch.ones_like(x), max_new_tokens=500, do_sample=False)
response = tok.decode(out[0, x.shape[1]:], skip_special_tokens=True)

spans, scores = label_response(model, tok, brand, ad_copy, question, level, response)
ad_sentences = [response[a:b] for (a, b), s in zip(spans, scores) if s > TAU]

Training

python scripts/train.py --base_model Qwen/Qwen3-4B-Instruct-2507 --output_dir outputs/adknob-qwen3-4b

Evaluation

M=wkim97/Qwen3-4B-AdKnob
O=outputs/qwen3-4b
export OPENAI_API_KEY=<your key>

python scripts/generate.py --model $M --output $O/generations.jsonl
python scripts/pseudo_label.py --model $M --generations $O/generations.jsonl --output $O/pseudo_labels.jsonl
python scripts/evaluate.py labeling --input $O/pseudo_labels.jsonl
python scripts/evaluate.py intensity --input $O/generations.jsonl --output $O/intensity.jsonl

Acknowledgements

Sentence splitting is adapted from AT2 (MIT License).

Citation

@inproceedings{kim2026adknob,
  title     = {AdKnob: Ad Intensity Control and Labeling for LLM-Native Advertising},
  author    = {Kim, Woo Jae and Keum, Seongho and Jeon, Joonsung and Ha, Suhyeon and Son, Sooel and Yoon, Sung-eui},
  booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
  year      = {2026}
}

License

This project is licensed under the CC BY 4.0 license.

About

AdKnob: Ad Intensity Control and Labeling for LLM-Native Advertising (NeurIPS 2026)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages