Pan Wang
commited on
Commit
·
dd50fcb
1
Parent(s):
9bd6888
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,2 +1,73 @@
|
|
| 1 |
-
# DLF
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DLF: Disentangled-Language-Focused Multimodal Sentiment Analysis, AAAI 2025.
|
| 2 |
+
|
| 3 |
+
## Main Contributions
|
| 4 |
+
|
| 5 |
+
Our main contributions can be summarized as follows:
|
| 6 |
+
|
| 7 |
+
- **Proposed Framework:** In this study, we propose a Disentangled-Language-Focused (DLF) multimodal representation learning framework to promote MSA tasks. The framework follows a structured pipeline: feature extraction, disentanglement, enhancement, fusion, and prediction.
|
| 8 |
+
- **Language-Focused Attractor (LFA):** We develop the LFA to fully harness the potential of the dominant language modality within the modality-specific space. The LFA exploits the language-guided multimodal cross-attention mechanisms to achieve a targeted feature enhancement ($X$$\rightarrow$Language).
|
| 9 |
+
- **Hierarchical Predictions:** We devise hierarchical predictions to leverage the pre-fused and post-fused features, improving the total MSA accuracy.
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
## The Framework.
|
| 13 |
+

|
| 14 |
+
The framework of DLF. Please refer to [Paper Link](arxiv) for details.
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
## Usage
|
| 18 |
+
|
| 19 |
+
### Prerequisites
|
| 20 |
+
- Python 3.9.13
|
| 21 |
+
- PyTorch 1.13.0
|
| 22 |
+
- CUDA 11.7
|
| 23 |
+
|
| 24 |
+
### Installation
|
| 25 |
+
- Create conda environment. Please make sure you have installed conda before.
|
| 26 |
+
```
|
| 27 |
+
conda create -n DLF python==3.9.13
|
| 28 |
+
```
|
| 29 |
+
```
|
| 30 |
+
pip install torch==1.13.0+cu117 torchvision==0.14.0+cu117 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu117
|
| 31 |
+
```
|
| 32 |
+
```
|
| 33 |
+
pip instal requirements.txt
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
### Datasets
|
| 37 |
+
Data files (containing processed MOSI, MOSEI datasets) can be downloaded from [here](https://drive.google.com/drive/folders/1BBadVSptOe4h8TWchkhWZRLJw8YG_aEi?usp=sharing).
|
| 38 |
+
You can first build and then put the downloaded datasets into `./dataset` directory and revise the path in `./config/config.json`. For example, if the processed the MOSEI dataset is located in `./dataset/MOSEI/aligned_50.pkl`. Please make sure "dataset_root_dir": "./dataset" and "featurePath": "MOSI/aligned_50.pkl".
|
| 39 |
+
Please note that the meta information and the raw data are not available due to privacy of Youtube content creators. For more details, please follow the [official website](https://github.com/A2Zadeh/CMU-MultimodalSDK) of these datasets.
|
| 40 |
+
|
| 41 |
+
### Run the Codes
|
| 42 |
+
- Training
|
| 43 |
+
|
| 44 |
+
You can first set the traning dataset name in `./train.py` as "mosei" or "mosi", and then run:
|
| 45 |
+
```
|
| 46 |
+
python3 train.py
|
| 47 |
+
```
|
| 48 |
+
By default, the trained model will be saved in `./pt` directory. You can change this in `train.py`.
|
| 49 |
+
|
| 50 |
+
- Testing
|
| 51 |
+
|
| 52 |
+
You can first set the testing dataset name in `./test.py` as "mosei" or "mosi", and then test the trained model:
|
| 53 |
+
```
|
| 54 |
+
python3 test.py
|
| 55 |
+
```
|
| 56 |
+
We also provide pretrained models for testing. ([Google drive](https://drive.google.com/drive/folders/1GgCfC1ITAnRRw6RScGc7c2YUg5Ccbdba?usp=sharing))
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
### Citation
|
| 60 |
+
If you find the code and our idea helpful in your resarch or work, please cite the following paper.
|
| 61 |
+
|
| 62 |
+
```
|
| 63 |
+
@article{wang2025dlf,
|
| 64 |
+
title={DLF: Disentangled-Language-Focused Multimodal Sentiment Analysis},
|
| 65 |
+
author={Wang, Pan and Zhou, Qiang and Wu, Yawen and Chen, Tianlong and Hu, Jingtong},
|
| 66 |
+
journal={arXiv preprint arXiv:2412},
|
| 67 |
+
year={2024}
|
| 68 |
+
}
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
|