The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
config_name: string
config: struct<variant: string, use_topk: bool, description: string>
child 0, variant: string
child 1, use_topk: bool
child 2, description: string
model_name: string
timestamps: struct<start: double, end: double, duration_s: double>
child 0, start: double
child 1, end: double
child 2, duration_s: double
pretrained: struct<sst2: struct<task: string, accuracy: double, correct: int64, total: int64>, mnli: struct<task (... 58 chars omitted)
child 0, sst2: struct<task: string, accuracy: double, correct: int64, total: int64>
child 0, task: string
child 1, accuracy: double
child 2, correct: int64
child 3, total: int64
child 1, mnli: struct<task: string, accuracy: double, correct: int64, total: int64>
child 0, task: string
child 1, accuracy: double
child 2, correct: int64
child 3, total: int64
gate_stats_pre: struct<sst2: struct<0: struct<mean_gate: double, n: int64>, 1: struct<mean_gate: double, n: int64>, (... 2374 chars omitted)
child 0, sst2: struct<0: struct<mean_gate: double, n: int64>, 1: struct<mean_gate: double, n: int64>, 2: struct<mea (... 1126 chars omitted)
child 0, 0: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 1, 1: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 2, 2: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
...
gate: double
child 1, n: int64
child 21, 21: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 22, 22: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 23, 23: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 24, 24: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 25, 25: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 26, 26: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 27, 27: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 28, 28: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 29, 29: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 9, metrics: struct<R_AA: double, R_BA: double, R_BB: double, BWT: double, average_accuracy: double>
child 0, R_AA: double
child 1, R_BA: double
child 2, R_BB: double
child 3, BWT: double
child 4, average_accuracy: double
to
{'baseline': {'config_name': Value('string'), 'config': {'variant': Value('null'), 'use_topk': Value('bool'), 'description': Value('string')}, 'model_name': Value('string'), 'timestamps': {'start': Value('float64'), 'end': Value('float64'), 'duration_s': Value('float64')}, 'pretrained': {'sst2': {'task': Value('string'), 'accuracy': Value('float64'), 'correct': Value('int64'), 'total': Value('int64')}, 'mnli': {'task': Value('string'), 'accuracy': Value('float64'), 'correct': Value('int64'), 'total': Value('int64')}}, 'after_task_a': {'sst2': {'task': Value('string'), 'accuracy': Value('float64'), 'correct': Value('int64'), 'total': Value('int64')}, 'mnli': {'task': Value('string'), 'accuracy': Value('float64'), 'correct': Value('int64'), 'total': Value('int64')}}, 'after_task_b': {'sst2': {'task': Value('string'), 'accuracy': Value('float64'), 'correct': Value('int64'), 'total': Value('int64')}, 'mnli': {'task': Value('string'), 'accuracy': Value('float64'), 'correct': Value('int64'), 'total': Value('int64')}}, 'metrics': {'R_AA': Value('float64'), 'R_BA': Value('float64'), 'R_BB': Value('float64'), 'BWT': Value('float64'), 'average_accuracy': Value('float64')}}, 'apical_A': {'config_name': Value('string'), 'config': {'variant': Value('string'), 'use_topk': Value('bool'), 'description': Value('string')}, 'model_name': Value('string'), 'timestamps': {'start': Value('float64'), 'end': Value('float64'), 'duration_s': Value('float64')}, 'pretrained': {'sst2': {'task': Value('str
...
'), 'n': Value('int64')}, '8': {'mean_gate': Value('float64'), 'n': Value('int64')}, '9': {'mean_gate': Value('float64'), 'n': Value('int64')}, '10': {'mean_gate': Value('float64'), 'n': Value('int64')}, '11': {'mean_gate': Value('float64'), 'n': Value('int64')}, '12': {'mean_gate': Value('float64'), 'n': Value('int64')}, '13': {'mean_gate': Value('float64'), 'n': Value('int64')}, '14': {'mean_gate': Value('float64'), 'n': Value('int64')}, '15': {'mean_gate': Value('float64'), 'n': Value('int64')}, '16': {'mean_gate': Value('float64'), 'n': Value('int64')}, '17': {'mean_gate': Value('float64'), 'n': Value('int64')}, '18': {'mean_gate': Value('float64'), 'n': Value('int64')}, '19': {'mean_gate': Value('float64'), 'n': Value('int64')}, '20': {'mean_gate': Value('float64'), 'n': Value('int64')}, '21': {'mean_gate': Value('float64'), 'n': Value('int64')}, '22': {'mean_gate': Value('float64'), 'n': Value('int64')}, '23': {'mean_gate': Value('float64'), 'n': Value('int64')}, '24': {'mean_gate': Value('float64'), 'n': Value('int64')}, '25': {'mean_gate': Value('float64'), 'n': Value('int64')}, '26': {'mean_gate': Value('float64'), 'n': Value('int64')}, '27': {'mean_gate': Value('float64'), 'n': Value('int64')}, '28': {'mean_gate': Value('float64'), 'n': Value('int64')}, '29': {'mean_gate': Value('float64'), 'n': Value('int64')}}}, 'metrics': {'R_AA': Value('float64'), 'R_BA': Value('float64'), 'R_BB': Value('float64'), 'BWT': Value('float64'), 'average_accuracy': Value('float64')}}}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 99, in get_rows_or_raise
return get_rows(
^^^^^^^^^
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 77, in get_rows
rows_plus_one = list(itertools.islice(ds, rows_max_number + 1))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2690, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2227, in __iter__
for key, pa_table in self._iter_arrow():
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2251, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 494, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 384, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 295, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 128, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2281, in table_cast
return cast_table_to_schema(table, schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2227, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
config_name: string
config: struct<variant: string, use_topk: bool, description: string>
child 0, variant: string
child 1, use_topk: bool
child 2, description: string
model_name: string
timestamps: struct<start: double, end: double, duration_s: double>
child 0, start: double
child 1, end: double
child 2, duration_s: double
pretrained: struct<sst2: struct<task: string, accuracy: double, correct: int64, total: int64>, mnli: struct<task (... 58 chars omitted)
child 0, sst2: struct<task: string, accuracy: double, correct: int64, total: int64>
child 0, task: string
child 1, accuracy: double
child 2, correct: int64
child 3, total: int64
child 1, mnli: struct<task: string, accuracy: double, correct: int64, total: int64>
child 0, task: string
child 1, accuracy: double
child 2, correct: int64
child 3, total: int64
gate_stats_pre: struct<sst2: struct<0: struct<mean_gate: double, n: int64>, 1: struct<mean_gate: double, n: int64>, (... 2374 chars omitted)
child 0, sst2: struct<0: struct<mean_gate: double, n: int64>, 1: struct<mean_gate: double, n: int64>, 2: struct<mea (... 1126 chars omitted)
child 0, 0: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 1, 1: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 2, 2: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
...
gate: double
child 1, n: int64
child 21, 21: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 22, 22: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 23, 23: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 24, 24: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 25, 25: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 26, 26: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 27, 27: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 28, 28: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 29, 29: struct<mean_gate: double, n: int64>
child 0, mean_gate: double
child 1, n: int64
child 9, metrics: struct<R_AA: double, R_BA: double, R_BB: double, BWT: double, average_accuracy: double>
child 0, R_AA: double
child 1, R_BA: double
child 2, R_BB: double
child 3, BWT: double
child 4, average_accuracy: double
to
{'baseline': {'config_name': Value('string'), 'config': {'variant': Value('null'), 'use_topk': Value('bool'), 'description': Value('string')}, 'model_name': Value('string'), 'timestamps': {'start': Value('float64'), 'end': Value('float64'), 'duration_s': Value('float64')}, 'pretrained': {'sst2': {'task': Value('string'), 'accuracy': Value('float64'), 'correct': Value('int64'), 'total': Value('int64')}, 'mnli': {'task': Value('string'), 'accuracy': Value('float64'), 'correct': Value('int64'), 'total': Value('int64')}}, 'after_task_a': {'sst2': {'task': Value('string'), 'accuracy': Value('float64'), 'correct': Value('int64'), 'total': Value('int64')}, 'mnli': {'task': Value('string'), 'accuracy': Value('float64'), 'correct': Value('int64'), 'total': Value('int64')}}, 'after_task_b': {'sst2': {'task': Value('string'), 'accuracy': Value('float64'), 'correct': Value('int64'), 'total': Value('int64')}, 'mnli': {'task': Value('string'), 'accuracy': Value('float64'), 'correct': Value('int64'), 'total': Value('int64')}}, 'metrics': {'R_AA': Value('float64'), 'R_BA': Value('float64'), 'R_BB': Value('float64'), 'BWT': Value('float64'), 'average_accuracy': Value('float64')}}, 'apical_A': {'config_name': Value('string'), 'config': {'variant': Value('string'), 'use_topk': Value('bool'), 'description': Value('string')}, 'model_name': Value('string'), 'timestamps': {'start': Value('float64'), 'end': Value('float64'), 'duration_s': Value('float64')}, 'pretrained': {'sst2': {'task': Value('str
...
'), 'n': Value('int64')}, '8': {'mean_gate': Value('float64'), 'n': Value('int64')}, '9': {'mean_gate': Value('float64'), 'n': Value('int64')}, '10': {'mean_gate': Value('float64'), 'n': Value('int64')}, '11': {'mean_gate': Value('float64'), 'n': Value('int64')}, '12': {'mean_gate': Value('float64'), 'n': Value('int64')}, '13': {'mean_gate': Value('float64'), 'n': Value('int64')}, '14': {'mean_gate': Value('float64'), 'n': Value('int64')}, '15': {'mean_gate': Value('float64'), 'n': Value('int64')}, '16': {'mean_gate': Value('float64'), 'n': Value('int64')}, '17': {'mean_gate': Value('float64'), 'n': Value('int64')}, '18': {'mean_gate': Value('float64'), 'n': Value('int64')}, '19': {'mean_gate': Value('float64'), 'n': Value('int64')}, '20': {'mean_gate': Value('float64'), 'n': Value('int64')}, '21': {'mean_gate': Value('float64'), 'n': Value('int64')}, '22': {'mean_gate': Value('float64'), 'n': Value('int64')}, '23': {'mean_gate': Value('float64'), 'n': Value('int64')}, '24': {'mean_gate': Value('float64'), 'n': Value('int64')}, '25': {'mean_gate': Value('float64'), 'n': Value('int64')}, '26': {'mean_gate': Value('float64'), 'n': Value('int64')}, '27': {'mean_gate': Value('float64'), 'n': Value('int64')}, '28': {'mean_gate': Value('float64'), 'n': Value('int64')}, '29': {'mean_gate': Value('float64'), 'n': Value('int64')}}}, 'metrics': {'R_AA': Value('float64'), 'R_BA': Value('float64'), 'R_BB': Value('float64'), 'BWT': Value('float64'), 'average_accuracy': Value('float64')}}}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Bicompartmental MLP Gating: Cross-Source Modulation in Transformer Feed-Forward Layers
Implementation and experimental results for bicompartmental MLP gating in transformers, inspired by cortical pyramidal neurons.
Architecture
Standard SwiGLU: out = W_down · (SiLU(W_gate · x) ⊙ W_up · x) — gate and value share input source.
Bicompartmental: out = W_down · (σ(W_apical · context + s) ⊙ SiLU(W_up · x)) — gate from external context (attention output), value from input.
Results Summary
Sequential fine-tuning: SST-2 (Task A) → MNLI (Task B) on SmolLM2-135M (1000 training samples per task, 3 epochs).
| Config | R_AA | R_BA | R_BB | BWT | Avg Acc |
|---|---|---|---|---|---|
| baseline | 0.910 | 0.885 | 0.540 | -0.025 | 0.713 |
| apical_A (per-token) | 0.540 | 0.150 | 0.265 | -0.390 | 0.208 |
| apical_B (pooled) | 0.565 | 0.075 | 0.280 | -0.490 | 0.178 |
| apical_A + TopK | 0.015 | 0.000 | 0.025 | -0.015 | 0.013 |
| apical_B + TopK | 0.000 | 0.000 | 0.115 | +0.000 | 0.058 |
Key Findings
Gates don't differentiate between tasks — Gate values are ~0.951 uniformly for both SST-2 and MNLI inputs (task differentiation < 0.0005). The shift parameter (s=3.0) saturates the sigmoid, preventing task-specific gating.
Architecture change is destructive — Replacing
SiLU(W_gate·x)withσ(const)fundamentally changes the computation. The model needs substantial fine-tuning to recover from initialization.TopK too aggressive at small scale — 20% sparsity combined with the disrupted signal prevents convergence with limited training.
Pooled context (B) worse than per-token (A) — Losing per-token information makes the gate less discriminative.
Files
code/bicompartmental_mlp.py— Core ApicalMLP module, model surgery, gate analysiscode/run_experiment.py— Full experiment pipeline (self-contained)analysis/README.md— Detailed analysis with recommendations*/results.json— Per-experiment results with gate statistics
Recommendations for GPU-scale experiments
- Lower shift (s=1.0) to allow gate differentiation
- Increase training (10K+ samples, 5+ epochs) for architecture recovery
- Freeze non-apical params during Task B for CL protection
- Try tanh gating (Flamingo-style) instead of sigmoid
- Downloads last month
- 8