Datasets:
Link paper and GitHub repository, and add sample usage
Browse filesHi! I'm Niels from the Hugging Face community science team.
This pull request improves the dataset card for the MCA^2 dataset. Key changes include:
- Added the `arxiv: 2601.17786` tag to the metadata to link the dataset to its corresponding research paper.
- Included links to the official paper and GitHub repository.
- Added a "Sample Usage" section with code snippets derived from the GitHub README to help users reproduce the results.
- Provided a BibTeX citation for the paper.
README.md
CHANGED
|
@@ -1,51 +1,76 @@
|
|
| 1 |
---
|
| 2 |
-
license: mit
|
| 3 |
language:
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
- anomaly-detection
|
| 7 |
-
- multi-view
|
| 8 |
-
- embeddings
|
| 9 |
-
- representation-learning
|
| 10 |
-
- contrastive-learning
|
| 11 |
-
task_categories:
|
| 12 |
-
- text-classification
|
| 13 |
size_categories:
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
dataset_info:
|
| 17 |
features:
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
---
|
| 23 |
|
| 24 |
# MCA^2 Data & Embeddings
|
| 25 |
|
| 26 |
-
|
| 27 |
|
| 28 |
-
|
|
|
|
|
|
|
| 29 |
|
| 30 |
## Content
|
| 31 |
|
| 32 |
-
- **data/**:
|
| 33 |
-
- **embeddings/**:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
## Notes
|
| 41 |
|
| 42 |
-
- Embeddings can be large; it is recommended to start with a smaller dataset first.
|
| 43 |
- If downloads are slow, you may try using a Hugging Face mirror (e.g., `https://hf-mirror.com`).
|
| 44 |
|
| 45 |
## Citation
|
| 46 |
|
| 47 |
-
If you use this dataset in your
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
## License
|
| 50 |
|
| 51 |
-
MIT License
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
language:
|
| 3 |
+
- en
|
| 4 |
+
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
size_categories:
|
| 6 |
+
- 1K<n<10K
|
| 7 |
+
task_categories:
|
| 8 |
+
- text-classification
|
| 9 |
+
pretty_name: MCA^2 Data & Embeddings
|
| 10 |
+
tags:
|
| 11 |
+
- anomaly-detection
|
| 12 |
+
- multi-view
|
| 13 |
+
- embeddings
|
| 14 |
+
- representation-learning
|
| 15 |
+
- contrastive-learning
|
| 16 |
+
arxiv: 2601.17786
|
| 17 |
dataset_info:
|
| 18 |
features:
|
| 19 |
+
- name: data
|
| 20 |
+
dtype: file
|
| 21 |
+
- name: embeddings
|
| 22 |
+
dtype: file
|
| 23 |
---
|
| 24 |
|
| 25 |
# MCA^2 Data & Embeddings
|
| 26 |
|
| 27 |
+
[**Paper**](https://huggingface.co/papers/2601.17786) | [**GitHub**](https://github.com/yankehan/MCA2)
|
| 28 |
|
| 29 |
+
This repository provides the **raw data (`data/`)** and the corresponding **precomputed multi-view embeddings (`embeddings/`)** for **MCA^2**, a two-stage multi-view text anomaly detection (TAD) framework.
|
| 30 |
+
|
| 31 |
+
MCA^2 exploits embeddings from multiple pretrained language models (views) and integrates them via a multi-view reconstruction model, contrastive collaboration, and adaptive allocation to identify anomalies. This dataset release facilitates reproduction by providing pre-extracted vectors, avoiding the need for expensive re-computation across various encoders (e.g., BERT, Stella, Qwen, and OpenAI).
|
| 32 |
|
| 33 |
## Content
|
| 34 |
|
| 35 |
+
- **data/**: Dataset files including train/test splits (e.g., `.npz` and `.jsonl` files).
|
| 36 |
+
- **embeddings/**: Pre-extracted vectors grouped by dataset and split. Multiple embedding files correspond to different "views" or encoders.
|
| 37 |
+
|
| 38 |
+
## Sample Usage
|
| 39 |
+
|
| 40 |
+
To reproduce the results for a specific dataset (such as OLID) using the MCA^2 framework, you can follow the instructions from the official repository:
|
| 41 |
|
| 42 |
+
```bash
|
| 43 |
+
# 1. Setup environment
|
| 44 |
+
conda create -n MCA2 python=3.9
|
| 45 |
+
conda activate MCA2
|
| 46 |
+
pip install torch sentence-transformers numpy transformers scikit-learn pandas tqdm pyod accelerate
|
| 47 |
|
| 48 |
+
# 2. Clone the repository and navigate to the evaluation directory
|
| 49 |
+
git clone https://github.com/yankehan/MCA2
|
| 50 |
+
cd MCA2/multiview_two_stage/eval
|
| 51 |
+
|
| 52 |
+
# 3. Run the evaluation script (ensure data and embeddings are placed in the project directory)
|
| 53 |
+
python ourmethod_eval.py --dataset olid --seeds 41,42,43,44,45
|
| 54 |
+
```
|
| 55 |
|
| 56 |
## Notes
|
| 57 |
|
| 58 |
+
- Embeddings can be large; it is recommended to start with a smaller dataset like **TAD-OLID** first.
|
| 59 |
- If downloads are slow, you may try using a Hugging Face mirror (e.g., `https://hf-mirror.com`).
|
| 60 |
|
| 61 |
## Citation
|
| 62 |
|
| 63 |
+
If you use this dataset or the MCA^2 framework in your research, please cite:
|
| 64 |
+
|
| 65 |
+
```bibtex
|
| 66 |
+
@article{yan2026beyond,
|
| 67 |
+
title={Beyond a Single Perspective: Text Anomaly Detection with Multi-View Language Representations},
|
| 68 |
+
author={Yan, Kehan and others},
|
| 69 |
+
journal={arXiv preprint arXiv:2601.17786},
|
| 70 |
+
year={2026}
|
| 71 |
+
}
|
| 72 |
+
```
|
| 73 |
|
| 74 |
## License
|
| 75 |
|
| 76 |
+
This dataset is released under the [MIT License](https://opensource.org/licenses/MIT).
|