223344 / README.md
zaaabik's picture
README: one-command download into cct-reproduce/data
64e2dac verified
|
Raw
History Blame Contribute Delete
2.56 kB
---
license: cc-by-4.0
pretty_name: CCT Class-Centroid Trajectories, pre-computed features
tags:
- uncertainty-estimation
- misclassification-detection
- transformers
- text-classification
---
# CCT — pre-computed features, predictions, results, and encoders
Companion data for *Class-Centroid Trajectories for Admissible
Misclassification Detection in Fine-Tuned Transformer Classifiers*.
The repository is laid out **exactly as the code expects**, so it drops
into the `cct-reproduce` package with a single command and no moving of
files:
```bash
hf download zaaabik/223344 --repo-type dataset --local-dir cct-reproduce/data
# older CLI: huggingface-cli download zaaabik/223344 --repo-type dataset --local-dir cct-reproduce/data
pytest cct-reproduce/tests/ # 46 tests, reproduces the paper numbers
```
Download only what you need (each is self-contained):
```bash
# CCT-25 + predictions only (~2 GB) — enough for every CCT table/figure
hf download zaaabik/223344 --repo-type dataset --local-dir cct-reproduce/data --include "features/*" "results/*"
# one configuration only
hf download zaaabik/223344 --repo-type dataset --local-dir cct-reproduce/data --include "features/roberta_cola/*"
```
## Layout
| Path | Size | Contents |
|---|---|---|
| `features/{cfg}/` | ~2 GB | `cct_{split}.npz` (CCT-25), `cls_{begin,mid,last}_{split}.npz`, `predictions_{split}.parquet` |
| `sv1/{cfg}/` | ~7 GB | AttnTopo per-family features: `{ripser,template,graph,toktopo_pd,toktopo_graph,intra_attn,punct,cls_last,cls_mid,cls_begin}_{split}.npz` (14,608 columns in total) |
| `results/` | small | cached per-paper-table CSVs |
| `checkpoints/{cfg}/` | ~2.5 GB | fine-tuned encoders (seed 0), for re-extracting features from scratch |
`{cfg}` is one of `{roberta,electra}_{cola,sst5,toxigen,newsgroups,goemotions}`
plus `roberta_yelp` and `electra_yelp`; `{split}` is `train`, `validation`, or `test`.
Splits are the ones the encoders were fine-tuned with, so there is no
train→validation leakage in detector training.
## Note when re-extracting features from `checkpoints/`
The weights are stored in bfloat16. Load them in float32 — with
`transformers>=5`, `from_pretrained` follows the checkpoint dtype by
default and bf16 inference shifts logits by up to ~0.08, which flips a
few predictions and perturbs the depth-based features:
```python
model = AutoModelForSequenceClassification.from_pretrained(path, dtype=torch.float32)
```
With float32 inference the released encoders reproduce the shipped
`predictions_*.parquet` logits to ~1e-5.