The code of paper"A Hierarchical Contrastive Representation Learning Model for Multi-view Document Clustering".
requirements.txt
========实例配置========
核数:9
内存:31 GB
磁盘:3% 901M/30G
显卡:Tesla P40, 1
Last login: Fri Mar 8 01:50:33 2024 from 172.17.0.1
cd "MvDC_HCRL-main"
(base) root@I189a74b1fd00301b0e:~# cd "MvDC_HCRL-main"
(base) root@I189a74b1fd00301b0e:~/MvDC_HCRL-main# nvidia-smi
Fri Mar 8 01:51:37 2024
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.104.12 Driver Version: 535.104.12 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 Tesla P40 On | 00000000:04:00.0 Off | N/A |
| N/A 45C P0 68W / 250W | 7636MiB / 23040MiB | 100% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
+---------------------------------------------------------------------------------------+
python main_contrastive.py
***** Loading training view *****
Num examples = %d 790
Iteration-training: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:09<00:00, 1.38s/it]
Iteration-training: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:09<00:00, 1.30s/it]
Iteration-training: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:09<00:00, 1.31s/it]
Iteration-training: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:08<00:00, 1.27s/it]
Iteration-training: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:08<00:00, 1.26s/it]
Iteration-training: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:08<00:00, 1.26s/it]
Epoch: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:54<00:00, 9.14s/it]
Extracting representation I: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:06<00:00, 1.04it/s]
view fusion
{'ACC': 0.938, 'NMI': 0.8164, 'ARI': 0.8415}
view index = 0
{'ACC': 0.8671, 'NMI': 0.6619, 'ARI': 0.6793}
view index = 1
{'ACC': 0.9494, 'NMI': 0.8463, 'ARI': 0.8715}
view common
{'ACC': 0.9392, 'NMI': 0.8171, 'ARI': 0.8446}
Extracting pro of q: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:07<00:00, 1.10s/it]
[[170 0 3 20]
[ 0 177 12 11]
[ 8 2 187 2]
[ 1 0 0 197]]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:13<00:00, 1.99s/it]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:23<00:00, 3.42s/it]
0 {'ACC': 0.9253, 'NMI': 0.7888, 'ARI': 0.8106, 'fine-tining_loss': 2.4669, 'delta_label': 0.0013, 'view_weights': [array(0.5, dtype=float32), array(0.5, dtype=float32)]}
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:13<00:00, 2.00s/it]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:24<00:00, 3.44s/it]
1 {'ACC': 0.9658, 'NMI': 0.8921, 'ARI': 0.9109, 'fine-tining_loss': 2.4013, 'delta_label': 0.0696, 'view_weights': [array(0.5, dtype=float32), array(0.5, dtype=float32)]}
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:13<00:00, 1.98s/it]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:24<00:00, 3.50s/it]
2 {'ACC': 0.9734, 'NMI': 0.905, 'ARI': 0.9306, 'fine-tining_loss': 2.2818, 'delta_label': 0.0253, 'view_weights': [array(0.5, dtype=float32), array(0.5, dtype=float32)]}
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:13<00:00, 1.98s/it]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:23<00:00, 3.33s/it]
3 {'ACC': 0.981, 'NMI': 0.9256, 'ARI': 0.95, 'fine-tining_loss': 2.2417, 'delta_label': 0.0152, 'view_weights': [array(0.5, dtype=float32), array(0.5, dtype=float32)]}
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:11<00:00, 1.64s/it]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:22<00:00, 3.17s/it]
4 {'ACC': 0.9772, 'NMI': 0.9187, 'ARI': 0.9405, 'fine-tining_loss': 2.2082, 'delta_label': 0.0114, 'view_weights': [array(0.5, dtype=float32), array(0.5, dtype=float32)]}
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:11<00:00, 1.64s/it]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:22<00:00, 3.25s/it]
5 {'ACC': 0.981, 'NMI': 0.9295, 'ARI': 0.9501, 'fine-tining_loss': 2.1908, 'delta_label': 0.0089, 'view_weights': [array(0.5, dtype=float32), array(0.5, dtype=float32)]}
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:11<00:00, 1.64s/it]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:22<00:00, 3.24s/it]
6 {'ACC': 0.981, 'NMI': 0.9293, 'ARI': 0.9502, 'fine-tining_loss': 2.1757, 'delta_label': 0.0025, 'view_weights': [array(0.5, dtype=float32), array(0.5, dtype=float32)]}
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:11<00:00, 1.65s/it]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:22<00:00, 3.24s/it]
7 {'ACC': 0.9835, 'NMI': 0.9387, 'ARI': 0.9568, 'fine-tining_loss': 2.1593, 'delta_label': 0.0025, 'view_weights': [array(0.5, dtype=float32), array(0.5, dtype=float32)]}
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:11<00:00, 1.64s/it]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:22<00:00, 3.25s/it]
8 {'ACC': 0.9823, 'NMI': 0.935, 'ARI': 0.9535, 'fine-tining_loss': 2.1475, 'delta_label': 0.0013, 'view_weights': [array(0.5, dtype=float32), array(0.5, dtype=float32)]}
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:11<00:00, 1.65s/it]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:22<00:00, 3.24s/it]
9 {'ACC': 0.9835, 'NMI': 0.9387, 'ARI': 0.9568, 'fine-tining_loss': 2.1407, 'delta_label': 0.0013, 'view_weights': [array(0.5, dtype=float32), array(0.5, dtype=float32)]}
Extracting pro of q: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:11<00:00, 1.71s/it]
final confusion_matrix
[[189 0 4 0]
[ 0 195 5 0]
[ 4 2 193 0]
[ 1 0 0 197]]
{'dataset': 'chinese_news', 'bert_model': 'bert-base-chinese', 'num_train_epochs': 6, 'max_seq_length': 100, 'train_batch_size': 128, 'thresholds': [0.95, 0.9], 'global_length': 5, 'CL-CluR-Data': {'ACC': 0.9253, 'NMI': 0.7888, 'ARI': 0.8106}, 'lambda': 1, 'lr': 5e-05, 'CL-CluR-Final': {'ACC': 0.9835, 'NMI': 0.9387, 'ARI': 0.9568, 'fine-tining_loss': 2.1407, 'delta_label': 0.0013, 'view_weights': [array(0.5, dtype=float32), array(0.5, dtype=float32)]}}
coming soon..