NeurIPS 2024 | Zichen Tian, Zhaozheng Chen, Qianru Sun | Singapore Management University
Official implementation of debLoRA from the paper "Learning De-Biased Representations for Remote-Sensing Imagery" (NeurIPS 2024).
Formerly circulated as "De-Biased Representation Learning for Long-tailed PEFT in Remote Sensing"; the published NeurIPS 2024 title is "Learning De-Biased Representations for Remote-Sensing Imagery".
Project page with PDF, BibTeX and results: https://www.doem1997.com/deblora/
Clone the repository
git clone https://github.com/doem97/deblora.gitThe folder structure should be like:
./
|-- data
|-- exp
|-- output
|-- scripts
|-- src
|-- .gitignore
`-- README.md
Please download datasets with huggingface-cli script and symbol link to ./data folder. See Datasets Documentation for more details.
To set up the deblora environment, follow these steps:
-
Create a new conda environment (recommended):
conda create -n deblora python=3.8 conda activate deblora -
Install the required packages using pip:
pip install -r requirements.txt
Feature extraction for 0 Shot, Fine-tuned, and LoRA:
# feature extraction for 0 shot and fine-tuned
bash ./exp/extract_0shot_feat.sh
bash ./exp/extract_finetune_feat.sh
# feature extraction for LoRA (feature calibration source for pLoRA)
bash ./exp/extract_lora_feat.shFor easy re-produce, we also provided the ready-to-use extracted features (download links in hf_features.sh). You could directly download the 0shot/fine-tuned/LoRA/pLoRA features by executing the script.
Linear probing for 0 Shot:
bash ./exp/0shot_linprob.shLinear probing for Fine-tuned:
bash ./exp/ft_linprob.shLinear probing for LoRA:
bash ./exp/lora_linprob.shFeature clustering and calibration for pLoRA:
bash ./exp/feat_cluster_lora_kmeans.shLinear probing for pLoRA:
bash ./exp/plora_linprob.shPlease note that the current code may be poorly organized and is in separate modules. The remaining CLIP code and data will be released in our upcoming work Meta-LoRA (https://github.com/doem97/metalora) with more streamlined pipelines. Please do not hesitate to raise repo issues if you have problems.
If you find this work useful, please cite:
@inproceedings{NEURIPS2024_6a8e1016,
author = {Tian, Zichen and Chen, Zhaozheng and Sun, Qianru},
booktitle = {Advances in Neural Information Processing Systems},
doi = {10.52202/079017-1848},
editor = {A. Globerson and L. Mackey and D. Belgrave and A. Fan and U. Paquet and J. Tomczak and C. Zhang},
pages = {57970--57992},
publisher = {Curran Associates, Inc.},
title = {Learning De-Biased Representations for Remote-Sensing Imagery},
url = {https://proceedings.neurips.cc/paper_files/paper/2024/file/6a8e10164a90d5c3660c3949289f969a-Paper-Conference.pdf},
volume = {37},
year = {2024}
}Keywords: debLoRA, de-biased LoRA, long-tailed LoRA, remote sensing foundation model adaptation, SAR, DOTA, FUSRS, class imbalance, parameter-efficient fine-tuning, NeurIPS 2024