Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    ParserError
Message:      Error tokenizing data. C error: Expected 1 fields in line 3, saw 2

Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 147, in get_rows_or_raise
                  return get_rows(
                      dataset=dataset,
                  ...<4 lines>...
                      column_names=column_names,
                  )
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                File "/src/services/worker/src/worker/utils.py", line 127, in get_rows
                  rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
                File "/src/services/worker/src/worker/utils.py", line 483, in safe_iter
                  yield from ds.decode(False) if ds.features else ds
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2840, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 506, in __iter__
                  yield from self.ex_iterable
                File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 398, in __iter__
                  for key, pa_table in self.generate_tables_fn(**gen_kwags):
                                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/csv/csv.py", line 198, in _generate_tables
                  for batch_idx, df in enumerate(csv_file_reader):
                                       ~~~~~~~~~^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/pandas/io/parsers/readers.py", line 1843, in __next__
                  return self.get_chunk()
                         ~~~~~~~~~~~~~~^^
                File "/usr/local/lib/python3.14/site-packages/pandas/io/parsers/readers.py", line 1985, in get_chunk
                  return self.read(nrows=size)
                         ~~~~~~~~~^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/pandas/io/parsers/readers.py", line 1923, in read
                  ) = self._engine.read(  # type: ignore[attr-defined]
                      ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      nrows
                      ^^^^^
                  )
                  ^
                File "/usr/local/lib/python3.14/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 234, in read
                  chunks = self._reader.read_low_memory(nrows)
                File "pandas/_libs/parsers.pyx", line 850, in pandas._libs.parsers.TextReader.read_low_memory
                File "pandas/_libs/parsers.pyx", line 905, in pandas._libs.parsers.TextReader._read_rows
                File "pandas/_libs/parsers.pyx", line 874, in pandas._libs.parsers.TextReader._tokenize_rows
                File "pandas/_libs/parsers.pyx", line 891, in pandas._libs.parsers.TextReader._check_tokenize_status
                File "pandas/_libs/parsers.pyx", line 2061, in pandas._libs.parsers.raise_parser_error
              pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 3, saw 2

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Epoche: teaching one model to bracket a shortcut prior

A small, fully reproducible experiment on shortcut learning: a two-path classifier learns handwritten digits while a color prior is made correct in 99% of training examples. We then test whether the same model can be trained to temporarily "bracket" (switch off) that prior and fall back to evidence-only inference — an idea borrowed, loosely, from Husserl's epoche (ἐποχή, "suspension").

This repository contains the code, per-seed results, aggregated CSVs, bootstrap CIs and all figures behind the article. Everything runs offline on CPU in a few minutes.

  • Data: sklearn.datasets.load_digits (identical to the HF mirror sklearn-docs/digits, 1,797 × 8×8 digits).
  • Compute: CPU, PyTorch. 6 training schemes × 3 test environments × 10 seeds.
  • Author: Viacheslav Golitsyn (webzuweb).

The setup in one paragraph

Each digit gets a 10-valued color prior. In training the color equals the label with probability ρ = 0.99. The model has an explicit evidence path (pixels) and an explicit prior path (color). We evaluate three passes: full (both inputs), bracketed (prior zeroed), prior-only (evidence zeroed), across three shifts: ID (ρ=0.99), Unbiased (ρ=0.10), Anti (ρ=0.00, the color always lies).

Headline results (10 seeds, 100 epochs)

Method / inference mode ID acc, % Unbiased acc, % Anti acc, %
ERM, full input 95.75 ± 1.19 86.39 ± 1.61 86.00 ± 1.68
ERM, post-hoc bracket 88.28 ± 1.54 88.08 ± 1.34 88.86 ± 1.21
Evidence-only 89.08 ± 1.70 88.69 ± 1.45 89.31 ± 1.38
Prior randomization 89.06 ± 1.93 88.83 ± 1.55 89.42 ± 1.33
Epoche 2-view 90.83 ± 1.28 88.94 ± 1.29 89.31 ± 1.32
Epoche 3-view dual, normal 94.28 ± 1.36 88.06 ± 1.53 87.47 ± 1.48
Epoche 3-view dual, bracketed 88.61 ± 1.66 88.86 ± 1.57 89.50 ± 1.49
Epoche 3-view robust, normal 91.81 ± 1.25 88.94 ± 1.22 89.03 ± 1.25

Honest negative control. Simply zeroing the color branch of a plain ERM model after training already reaches 88.86% on Anti. The extra Epoche training adds only +0.64 pp over that post-hoc baseline (paired bootstrap 95% CI [+0.17; +1.17]).

The substantive result is not raw OOD accuracy but a switchable model: the dual configuration keeps +5.19 pp ID accuracy over evidence-only (95% CI [+4.44; +6.00]) while matching its robustness once the prior is explicitly bracketed.

Accuracy under shift Paired differences (forest plot)

Reproduce

pip install -r requirements.txt
python epoche_experiment.py --output-dir results --seeds 10 --epochs 100
# faster smoke test:
python epoche_experiment.py --output-dir results_smoke --seeds 2 --epochs 30

Extra analysis figures (forest plot, cliff, per-seed spread, heatmap):

python extra_charts.py

What's in this repo

epoche_experiment.py        # full experiment (model, losses, 6 methods, metrics, figures)
extra_charts.py             # 4 additional charts from the saved results
requirements.txt            # torch, numpy, scikit-learn, pandas, matplotlib
README_verification.md      # independent reproduction notes (numbers matched to 2nd decimal)
results/
  results.md                # summary table
  deployment_summary.csv    # per method/mode means + stds
  summary_results.csv       # all metrics, mean/std over seeds
  per_seed_results.csv      # raw per-seed metrics
  paired_bootstrap.json     # paired differences + 95% CIs
  config.json               # exact hyperparameters
  training_curve_seed0_*.csv
  figures/*.png             # 9 figures

Key hyperparameters

AdamW, lr=0.01, weight_decay=3e-4, 100 epochs, 60/20/20 stratified split, sensor noise σ=0.20. Dual weights (α,β,γ)=(0.10,0.02,0.02); robust (0.50,0.10,0.10). Full config in results/config.json.

Loss (three-view Epoche)

L=CE(zfull,y)+αCE(zbrk,y)+βJS(pfullpbrk)+γDKL(ppriorU10). \mathcal L = \operatorname{CE}(z^{full},y) + \alpha\,\operatorname{CE}(z^{brk},y) + \beta\, JS(p^{full}\Vert p^{brk}) + \gamma\, D_{KL}(p^{prior}\Vert U_{10}).

Intended use & limitations

This is a controlled diagnostic, not a benchmark win. It assumes the suspicious prior is known in advance (a dedicated branch). A single 8×8 toy benchmark cannot show that the method beats GroupDRO/JTT/ReBias on natural images — the planned next step is grodino/waterbirds with worst-group metrics. Use it to study the mechanism, teach the idea, or as a starting point for a stronger evaluation.

Citation

@misc{golitsyn2026epoche,
  title  = {Philosophy as Inductive Bias: Bracketing a Shortcut Prior (Epoche)},
  author = {Golitsyn, Viacheslav},
  year   = {2026},
  note   = {Reproducible experiment, sklearn-docs/digits}
}

References

License

MIT (see license in the metadata above).

Downloads last month
27

Papers for webzuweb/epoche-shortcut-experiment