Skip to content

Official implementation of Lightweight Auto-bidding based on Traffic Prediction in Live Advertising, accepted by KDD 2025

License

Notifications You must be signed in to change notification settings

alimama-tech/BiCB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lightweight Auto-bidding based on Traffic Prediction in Live Advertising

Official implementation of Lightweight Auto-bidding based on Traffic Prediction in Live Advertising, accepted by KDD 2025. This repository provides public dataset and reproducible code for the high-frequency bidding decision problem in live streaming, so that researchers can verify the stability and effectiveness.This repository is a specialized subproject of AuctionNet. While AuctionNet provides a comprehensive framework for advertising auction mechanisms, this repository focuses specifically on high-frequency bidding decisions for live-streaming advertising scenarios. Future iterations of AuctionNet will incorporate these high-frequency bidding components as core features.

Paper Dataset License Git LFS

Introduction

BiCB (Binary Constrained Bidding) is a lightweight auto-bidding algorithm designed for real-time advertising in live streaming scenarios. It addresses the challenge of maximizing advertiser value (e.g., conversions) under budget and cost-per-click (CPC) constraints with second-level control requirements. Key innovations include:

  • 🚀 Traffic-aware bidding: Combines LP dual analysis with statistical traffic prediction
  • Lightweight design: Achieves near-optimal performance with low computational overhead
  • 🔒 Full constraint support: Handles both upper/lower CPC bounds for traffic quality control
  • 🧠 Theoretical guarantees: Provable approximation ratio to optimal solution

This repository provides:

  • 🗃️ Public dataset from live streaming advertising (managed with Git LFS)
  • 🧩 Reproducible code for high-frequency bidding decisions
  • 📊 Benchmark implementations for stability and effectiveness verification

Installation

Dependencies

Quick Start

1. Install Git LFS.

Large dataset files are managed using Git LFS. If you already have Git LFS installed, you can skip the installation steps below.

# Linux (Debian/Ubuntu)
sudo apt install git-lfs

# macOS (Homebrew)
brew install git-lfs

# Windows (Chocolatey)
choco install git-lfs

2. Initialize Git LFS (required once per machine).

git lfs install

3. Clone the repository and install dependencies.

git clone https://github.com/alimama-tech/BiCB
cd BiCB

# Create conda environment
conda create -n bicb python=3.8
conda activate bicb

# Install core dependencies
pip install -r requirements.txt

Usage

Data Processing

cd  data
unzip bidding_period_0-5.zip
cd ../saved_model/bicb_model/
unzip bicb_model.zip

The directory structure under data should be:

BiCB
|── data
    |── bidding_period_0.csv
    |── bidding_period_1.csv
    |── bidding_period_2.csv
    |── bidding_period_3.csv
    |── bidding_period_4.csv
    |── bidding_period_5.csv
|── saved_model
    |── bicb_model
        |── clk_model.txt
        |── cost_model.txt
....

Train Model

generate the training data and train the BiCB bidding strategy model.

python bidding_train_env/dataloader/bicb_train_data_generator.py
python main/main_train_bicb.py

We provide a pre-trained model at ./saved_models/bicb_model/, so the training step can be skipped for quick evaluation.

offline evaluation

Load the training data to construct an offline evaluation environment for assessing the bidding strategy offline.

python main/main_test.py <strategy>

Available strategies:
BiCBBiddingStrategy      - BiCB algorithm
GodBiCBStrategy          - BiCB algorithm when the prediction model can make completely accurate predictions of future traffic
GodBiddingStrategy       - With the supernatural abilities that can predict the traffic details of the whole day, offline linear program- ming gives the theoretical optimal bidding solution
OfflineLpBiddingStrategy - Do linear programming on previous period to get the optimal dual variables, and use this solution to bid in the test set.
PidBiddingStrategy       - Use independent PID control system for all dual variables. The dual variables are adjusted in real time according to whether the cost speed or CPC in the most recent time window meets the constraints.

evaluation results

Method Cost BR 𝑅/𝑅∗ OCR G
GodBiddingStrategy 17834.03 99.80% 100.00% 0 100.00%
GodBiCBStrategy 17862.73 99.96% 99.98% 0 99.98%
OfflineLpBiddingStrategy 11769.97 65.86% 61.22% 2.50% 60.57%
BiCBBiddingStrategy 17791.45 99.56% 82.99% 0 82.99%
PidBiddingStrategy 17867.85 99.92% 74.99% 2.50% 69.90%

Citation

@inproceedings{
  yang2025bicb,
  title={Lightweight Auto-bidding based on Traffic Prediction in Live Advertising},
  author={Yang, Bo and Luo, Ruixuan and Jin, Junqi and Zhu, Han},
  booktitle={Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  pages={xx--xx},
  year={2025}
}

This work is part of the AuctionNet research initiative. When using this repository, please cite:

@inproceedings{
    su2024a,
    title={AuctionNet: A Novel Benchmark for Decision-Making in Large-Scale Games},
    author={Kefan Su and Yusen Huo and Zhilin Zhang and Shuai Dou and Chuan Yu and Jian Xu and Zongqing Lu and Bo Zheng},
    booktitle={The Thirty-eight Conference on Neural Information Processing Systems Datasets and Benchmarks Track},
    year={2024},
    url={https://arxiv.org/abs/2412.10798}
}

License

This project is licensed under the Apache License 2.0.

Appendix

Traffic granularity data format

The training dataset is derived from advertising delivery data generated via the auction system where multiple advertisers compete against each other. Participants can use this dataset to recreate the historical delivery process of all advertisers across all impression opportunities. The training dataset includes 6 delivery periods. Each delivery period is divided into 1440 steps. There are 40 advertisers competing for these opportunities. The specific data format is as follows:

  • delivery_period_index: Represents the index of the current delivery period.
  • advertiser_id: Represents the unique identifier of the advertiser.
  • budget: Represents the advertiser's budget for a delivery period.
  • cpc_upper: Represents the CPC constraint upper bound of the advertiser.
  • cpc_lower: Represents the CPC constraint lower bound of the advertiser.
  • time_step_index: Represents the index of the current decision time step.
  • pv_index: Represents the index of the impression opportunity.
  • p_value: Represents the traffic value of opportunity.
  • pctr: Represents the PCTR of the impression opportunity.
  • pcvr: Represents the PCVR of the impression opportunity.
  • bid: Represents the advertiser's bid for the impression opportunity.
  • xi: Represents the winning status of the advertiser for the impression opportunity, where 1 implies winning the opportunity and 0 suggests not winning the opportunity.
  • ad_slot: Represents the won ad slot. The value ranges from 1 to 2, with 0 indicating not winning the opportunity .
  • cost: Represents the cost that the advertiser needs to pay if the ad is clicked by the customer.
  • is_click: Represents whether the ad in the slot was clicked by the customer, where 1 implies the ad is clicked and 0 suggests not clicked.
  • is_pay: Represents whether the conversion action has occurred, where 1 implies the occurrence of the conversion action and 0 suggests that it has not occurred.
  • least_winning_cost: Represents the minimum cost to win the impression opportunity,i.e., the 3-th highest bid of the impression opportunity.
  • max_time_step_index: Represents the max index of the decision time step

Training data example

delivery_period_index advertiser_id budget cpc_upper cpc_lower time_step_index pv_index p_value pctr pcvr bid xi ad_slot cost is_click is_pay least_winning_cost max_time_step_index
0 0 400.0 3.0 0.3 540 0 0.3136800491128725 0.0989 0.0003 0 0 0 0.0 0 0 1.644438542252488 1439
0 0 400.0 3.0 0.3 540 1 1.1987799889510595 0.177 0.0011 8 0 0 0.0 0 0 4.412224999487012 1439
0 0 400.0 3.0 0.3 540 2 24.945485134195064 0.3865 0.023 16 0 0 0.0 0 0 5.85108489851579 1439
0 0 400.0 3.0 0.3 540 3 1.954919731588616 0.2785 0.0019 5 0 0 0.0 0 0 1.7695419178188223 1439
0 0 400.0 3.0 0.3 540 4 1.0886247746140458 0.2104 0.001 7 0 0 0.0 0 0 8.04562105568753 1439

About

Official implementation of Lightweight Auto-bidding based on Traffic Prediction in Live Advertising, accepted by KDD 2025

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages