Datasets:
Update README with new dataset structure and loading instructions
Browse files
README.md
CHANGED
|
@@ -11,6 +11,8 @@ tags:
|
|
| 11 |
- symbolic-reasoning
|
| 12 |
- algebra
|
| 13 |
- sequence-modeling
|
|
|
|
|
|
|
| 14 |
pretty_name: Permutation Groups Composition Dataset
|
| 15 |
size_categories:
|
| 16 |
- 10M<n<100M
|
|
@@ -18,146 +20,179 @@ size_categories:
|
|
| 18 |
|
| 19 |
# Permutation Groups Composition Dataset
|
| 20 |
|
| 21 |
-
A comprehensive collection of permutation composition datasets for various mathematical groups
|
| 22 |
|
| 23 |
-
##
|
| 24 |
|
| 25 |
-
This dataset
|
| 26 |
|
| 27 |
-
###
|
| 28 |
|
| 29 |
-
|
| 30 |
-
- **S3** to **S7**: All permutations of n elements (orders: 6, 24, 120, 720, 5040)
|
| 31 |
|
| 32 |
-
|
| 33 |
-
-
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
|
| 36 |
-
- **C3** to **C12**: Cyclic groups of order n
|
| 37 |
-
- **Z3** to **Z6**: Alternative notation for cyclic groups
|
| 38 |
-
- Orders: 3, 4, 5, 6, 7, 8, 10, 12
|
| 39 |
-
|
| 40 |
-
#### Dihedral Groups (Dn)
|
| 41 |
-
- **D3** to **D8**: Symmetries of regular n-gons (orders: 6, 8, 10, 12, 14, 16)
|
| 42 |
|
| 43 |
-
|
| 44 |
-
- **PSL(2,5)**: Projective special linear group (order 60)
|
| 45 |
-
- **F20**: Frobenius group F(5,4) (order 20)
|
| 46 |
|
| 47 |
-
###
|
|
|
|
| 48 |
|
| 49 |
-
|
| 50 |
-
|
| 51 |
|
| 52 |
-
|
| 53 |
-
-
|
| 54 |
-
- Evaluating mathematical understanding and compositional generalization
|
| 55 |
-
- Benchmarking sequence models on structured mathematical tasks
|
| 56 |
-
- Studying group theory properties in neural networks
|
| 57 |
-
- Research in abstract algebra and computational mathematics
|
| 58 |
|
| 59 |
## Usage
|
| 60 |
|
|
|
|
|
|
|
| 61 |
```python
|
| 62 |
from datasets import load_dataset
|
| 63 |
|
| 64 |
-
#
|
| 65 |
-
s5_data = load_dataset(
|
| 66 |
-
|
| 67 |
-
name="s5", # Just the group name
|
| 68 |
-
max_len=32, # Optional: filter sequences ≤ 32 (default: 512)
|
| 69 |
-
trust_remote_code=True
|
| 70 |
-
)
|
| 71 |
-
|
| 72 |
-
# More examples with the clean API
|
| 73 |
-
c8_short = load_dataset("BeeGass/permutation-groups", name="c8", max_len=16, trust_remote_code=True)
|
| 74 |
-
d4_medium = load_dataset("BeeGass/permutation-groups", name="d4", max_len=64, trust_remote_code=True)
|
| 75 |
-
all_short = load_dataset("BeeGass/permutation-groups", name="all", max_len=32, trust_remote_code=True)
|
| 76 |
|
| 77 |
-
#
|
| 78 |
-
|
| 79 |
-
|
| 80 |
|
| 81 |
-
# Access
|
| 82 |
train_data = s5_data["train"]
|
| 83 |
test_data = s5_data["test"]
|
| 84 |
-
|
| 85 |
-
# Example data point
|
| 86 |
-
print(train_data[0])
|
| 87 |
-
# {'input_sequence': '23 45 12', 'target': '67'}
|
| 88 |
```
|
| 89 |
|
| 90 |
-
|
| 91 |
|
| 92 |
-
Each example contains:
|
| 93 |
-
- `input_sequence`: A space-separated sequence of permutation IDs to be composed
|
| 94 |
-
- `target`: The ID of the resulting permutation after composition
|
| 95 |
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
|
| 98 |
-
|
| 99 |
|
| 100 |
-
|
| 101 |
-
Simply specify the group name and optional `max_len` parameter:
|
| 102 |
|
| 103 |
```python
|
| 104 |
-
# Load
|
| 105 |
-
dataset = load_dataset("BeeGass/permutation-groups",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
```
|
| 107 |
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
|
| 113 |
-
|
| 114 |
-
|
|
| 115 |
-
|
|
| 116 |
-
|
|
| 117 |
-
|
|
| 118 |
-
|
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
-
|
| 141 |
-
-
|
| 142 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
|
| 144 |
## Citation
|
| 145 |
|
| 146 |
-
|
| 147 |
|
| 148 |
```bibtex
|
| 149 |
-
@
|
| 150 |
-
author = {Bryan
|
| 151 |
-
title = {Permutation Groups Dataset},
|
| 152 |
year = {2024},
|
| 153 |
publisher = {Hugging Face},
|
| 154 |
-
url = {https://huggingface.co/datasets/BeeGass/permutation-groups}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
}
|
| 156 |
```
|
| 157 |
|
| 158 |
## Acknowledgments
|
| 159 |
|
| 160 |
-
This dataset was inspired by the work of
|
| 161 |
|
| 162 |
## License
|
| 163 |
|
|
@@ -165,4 +200,4 @@ This dataset is released under the MIT License.
|
|
| 165 |
|
| 166 |
## Contact
|
| 167 |
|
| 168 |
-
For questions or
|
|
|
|
| 11 |
- symbolic-reasoning
|
| 12 |
- algebra
|
| 13 |
- sequence-modeling
|
| 14 |
+
- state-space-models
|
| 15 |
+
- computational-complexity
|
| 16 |
pretty_name: Permutation Groups Composition Dataset
|
| 17 |
size_categories:
|
| 18 |
- 10M<n<100M
|
|
|
|
| 20 |
|
| 21 |
# Permutation Groups Composition Dataset
|
| 22 |
|
| 23 |
+
A comprehensive collection of permutation composition datasets for various mathematical groups, organized by computational complexity classes. This dataset is designed for studying the "Illusion of State" phenomenon in state-space models and transformer architectures.
|
| 24 |
|
| 25 |
+
## Overview
|
| 26 |
|
| 27 |
+
This dataset provides 59 individual permutation group datasets spanning 10 different group families, systematically organized to facilitate research on the computational boundaries between solvable and non-solvable groups. The organization reflects the fundamental distinction between TC⁰-computable (solvable groups) and NC¹-complete (non-solvable groups) problems.
|
| 28 |
|
| 29 |
+
### Research Motivation
|
| 30 |
|
| 31 |
+
Recent theoretical work demonstrates that TC⁰ models, including Transformers and standard State-Space Models (SSMs), cannot solve NC¹-complete problems such as composing permutations in non-solvable groups. This dataset enables researchers to:
|
|
|
|
| 32 |
|
| 33 |
+
- Empirically verify theoretical computational complexity boundaries
|
| 34 |
+
- Study the "Illusion of State" phenomenon in neural architectures
|
| 35 |
+
- Benchmark mathematical reasoning capabilities of sequence models
|
| 36 |
+
- Investigate generalization patterns across different group structures
|
| 37 |
+
- Analyze the relationship between model architecture and algebraic computation
|
| 38 |
|
| 39 |
+
## Dataset Structure
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
+
The dataset is organized in three complementary ways to support different research approaches:
|
|
|
|
|
|
|
| 42 |
|
| 43 |
+
### 1. Flat Organization (data/)
|
| 44 |
+
All 59 individual group datasets are available for direct access in a flat structure, facilitating straightforward loading and comparison across groups.
|
| 45 |
|
| 46 |
+
### 2. TC⁰ Complexity Class (TC0/)
|
| 47 |
+
Contains 43 solvable groups that can theoretically be computed by constant-depth threshold circuits. These groups serve as positive controls where current neural architectures should succeed.
|
| 48 |
|
| 49 |
+
### 3. NC¹ Complexity Class (NC1/)
|
| 50 |
+
Contains 14 non-solvable groups requiring logarithmic-depth circuits for computation. These groups represent problems that are provably beyond the computational capacity of TC⁰ models.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
## Usage
|
| 53 |
|
| 54 |
+
### Basic Loading
|
| 55 |
+
|
| 56 |
```python
|
| 57 |
from datasets import load_dataset
|
| 58 |
|
| 59 |
+
# Load specific group datasets
|
| 60 |
+
s5_data = load_dataset("BeeGass/permutation-groups", data_dir="data/s5")
|
| 61 |
+
a4_data = load_dataset("BeeGass/permutation-groups", data_dir="data/a4")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
+
# Load from complexity-organized directories
|
| 64 |
+
tc0_cyclic = load_dataset("BeeGass/permutation-groups", data_dir="TC0/c10")
|
| 65 |
+
nc1_symmetric = load_dataset("BeeGass/permutation-groups", data_dir="NC1/s7")
|
| 66 |
|
| 67 |
+
# Access train/test splits
|
| 68 |
train_data = s5_data["train"]
|
| 69 |
test_data = s5_data["test"]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
```
|
| 71 |
|
| 72 |
+
### Data Format
|
| 73 |
|
| 74 |
+
Each example contains the following fields:
|
|
|
|
|
|
|
| 75 |
|
| 76 |
+
```python
|
| 77 |
+
{
|
| 78 |
+
'input_sequence': [123, 456, 789], # Permutation IDs to compose
|
| 79 |
+
'target': 234, # Result of composition
|
| 80 |
+
'length': 3, # Number of permutations in this sequence
|
| 81 |
+
'group_degree': 7, # Degree of the permutation group (e.g., S7 acts on 7 elements)
|
| 82 |
+
'group_order': 5040 # Order (size) of the group (e.g., |S7| = 7!)
|
| 83 |
+
}
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
Note: Each dataset contains sequences of varying lengths. The 'length' field indicates how many permutations are in that particular example's input sequence (ranging from 3 to 1024).
|
| 87 |
|
| 88 |
+
### Filtering by Sequence Length
|
| 89 |
|
| 90 |
+
Since each dataset contains sequences of all lengths from 3 to 1024, researchers often need to filter for specific length ranges:
|
|
|
|
| 91 |
|
| 92 |
```python
|
| 93 |
+
# Load full dataset
|
| 94 |
+
dataset = load_dataset("BeeGass/permutation-groups", data_dir="data/s5")
|
| 95 |
+
|
| 96 |
+
# Filter for sequences of specific lengths
|
| 97 |
+
short_sequences = dataset.filter(lambda x: x['length'] <= 32)
|
| 98 |
+
medium_sequences = dataset.filter(lambda x: 32 < x['length'] <= 128)
|
| 99 |
+
length_16_only = dataset.filter(lambda x: x['length'] == 16)
|
| 100 |
```
|
| 101 |
|
| 102 |
+
## Group Inventory
|
| 103 |
+
|
| 104 |
+
### TC⁰ Groups (Solvable) - 43 Groups
|
| 105 |
+
|
| 106 |
+
| Group Family | Groups | Orders | Mathematical Properties |
|
| 107 |
+
|--------------|--------|--------|------------------------|
|
| 108 |
+
| Symmetric | S3, S4 | 6, 24 | Solvable for n ≤ 4 |
|
| 109 |
+
| Alternating | A3, A4 | 3, 12 | Solvable for n ≤ 4 |
|
| 110 |
+
| Cyclic | C3, C4, C5, C6, C7, C8, C9, C10, C12, C15, C20, C25, C30 | 3-30 | Abelian groups |
|
| 111 |
+
| Dihedral | D3, D4, D5, D6, D7, D8, D9, D10, D12, D15, D20 | 6-40 | Symmetries of regular polygons |
|
| 112 |
+
| Klein | V4 | 4 | Smallest non-cyclic abelian group |
|
| 113 |
+
| Quaternion | Q8, Q16, Q32 | 8, 16, 32 | Non-abelian 2-groups |
|
| 114 |
+
| Elementary Abelian | Z2², Z2³, Z2⁴, Z2⁵, Z3¹, Z3², Z3³, Z5¹, Z5² | Various | Direct products of cyclic groups |
|
| 115 |
+
| Frobenius | F20, F21 | 20, 21 | Transitive permutation groups |
|
| 116 |
+
|
| 117 |
+
### NC¹ Groups (Non-Solvable) - 14 Groups
|
| 118 |
+
|
| 119 |
+
| Group Family | Groups | Orders | Mathematical Properties |
|
| 120 |
+
|--------------|--------|--------|------------------------|
|
| 121 |
+
| Symmetric | S5, S6, S7, S8, S9 | 120-362,880 | Non-solvable for n ≥ 5 |
|
| 122 |
+
| Alternating | A5, A6, A7, A8, A9 | 60-181,440 | Simple groups for n ≥ 5 |
|
| 123 |
+
| Projective Special Linear | PSL(2,5), PSL(2,7) | 60, 168 | Simple groups |
|
| 124 |
+
| Mathieu | M11, M12 | 7,920, 95,040 | Sporadic simple groups |
|
| 125 |
+
|
| 126 |
+
## Technical Specifications
|
| 127 |
+
|
| 128 |
+
### Permutation Representation
|
| 129 |
+
- Each permutation is assigned a unique integer identifier within its group
|
| 130 |
+
- Mappings between IDs and permutation arrays are consistent across train/test splits
|
| 131 |
+
- Permutation composition follows right-to-left convention (standard in mathematics)
|
| 132 |
+
|
| 133 |
+
### Dataset Statistics
|
| 134 |
+
- **Train/Test Split**: 80/20 ratio for all groups
|
| 135 |
+
- **Sequence Lengths**: Variable lengths from 3 to 1024 permutations per example
|
| 136 |
+
- **File Format**: Apache Arrow for efficient data loading and memory mapping
|
| 137 |
+
- **Total Size**: Varies by group order and maximum sequence length
|
| 138 |
+
|
| 139 |
+
### Composition Convention
|
| 140 |
+
For an input sequence [p₁, p₂, p₃], the target is computed as:
|
| 141 |
+
- Mathematical notation: p₃ ∘ p₂ ∘ p₁
|
| 142 |
+
- Operational interpretation: First apply p₁, then p₂, then p₃
|
| 143 |
+
|
| 144 |
+
## Dataset Generation
|
| 145 |
+
|
| 146 |
+
The code used to generate this dataset is available at [https://github.com/BeeGass/permutation-groups](https://github.com/BeeGass/permutation-groups). The repository includes:
|
| 147 |
+
|
| 148 |
+
- Complete implementation of all permutation groups
|
| 149 |
+
- Dataset generation scripts with configurable parameters
|
| 150 |
+
- Verification and testing utilities
|
| 151 |
+
- Documentation for extending the dataset with additional groups
|
| 152 |
+
|
| 153 |
+
## Research Applications
|
| 154 |
+
|
| 155 |
+
This dataset supports various research directions:
|
| 156 |
+
|
| 157 |
+
1. **Computational Complexity Theory**: Empirical validation of TC⁰/NC¹ separation in neural networks
|
| 158 |
+
2. **State-Space Model Analysis**: Testing fundamental limitations of linear recurrent architectures
|
| 159 |
+
3. **Transformer Architecture Studies**: Investigating attention mechanism constraints
|
| 160 |
+
4. **Mathematical Reasoning**: Benchmarking symbolic manipulation capabilities
|
| 161 |
+
5. **Generalization Studies**: Cross-length and cross-group generalization patterns
|
| 162 |
+
6. **Representation Learning**: Understanding how models encode algebraic structures
|
| 163 |
|
| 164 |
## Citation
|
| 165 |
|
| 166 |
+
When using this dataset in academic work, please cite:
|
| 167 |
|
| 168 |
```bibtex
|
| 169 |
+
@dataset{gass2024permutation,
|
| 170 |
+
author = {Gass, Bryan},
|
| 171 |
+
title = {Permutation Groups Composition Dataset},
|
| 172 |
year = {2024},
|
| 173 |
publisher = {Hugging Face},
|
| 174 |
+
url = {https://huggingface.co/datasets/BeeGass/permutation-groups},
|
| 175 |
+
note = {Organized by computational complexity classes (TC⁰/NC¹)}
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
@software{gass2024generator,
|
| 179 |
+
author = {Gass, Bryan},
|
| 180 |
+
title = {Permutation Groups Dataset Generator},
|
| 181 |
+
year = {2024},
|
| 182 |
+
url = {https://github.com/BeeGass/permutation-groups}
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
@article{merrill2024illusion,
|
| 186 |
+
title = {The Illusion of State in State-Space Models},
|
| 187 |
+
author = {Merrill, William and Jackson, Ashish and Goldstein, Yoav and Weiss, Gail and Angluin, Dana},
|
| 188 |
+
journal = {arXiv preprint arXiv:2404.08819},
|
| 189 |
+
year = {2024}
|
| 190 |
}
|
| 191 |
```
|
| 192 |
|
| 193 |
## Acknowledgments
|
| 194 |
|
| 195 |
+
This dataset was inspired by the theoretical work of William Merrill and colleagues on "The Illusion of State in State-Space Models" (arXiv:2404.08819), which establishes fundamental computational limitations of state-space models through group-theoretic analysis.
|
| 196 |
|
| 197 |
## License
|
| 198 |
|
|
|
|
| 200 |
|
| 201 |
## Contact
|
| 202 |
|
| 203 |
+
For questions, issues, or contributions, please use the Hugging Face dataset repository's discussion forum or contact Bryan Gass directly.
|