BeeGass commited on
Commit
c6b5ed1
·
verified ·
1 Parent(s): f6623ef

Update README with new dataset structure and loading instructions

Browse files
Files changed (1) hide show
  1. README.md +134 -99
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 including symmetric, alternating, cyclic, dihedral, and special groups, with multiple sequence length variants.
22
 
23
- ## Dataset Description
24
 
25
- This dataset contains permutation composition problems across 30 different mathematical groups with 8 different sequence length variants each, totaling 270 distinct configurations.
26
 
27
- ### Supported Groups
28
 
29
- #### Symmetric Groups (Sn)
30
- - **S3** to **S7**: All permutations of n elements (orders: 6, 24, 120, 720, 5040)
31
 
32
- #### Alternating Groups (An)
33
- - **A3** to **A7**: Even permutations of n elements (orders: 3, 12, 60, 360, 2520)
 
 
 
34
 
35
- #### Cyclic Groups (Cn/Zn)
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
- #### Special Groups
44
- - **PSL(2,5)**: Projective special linear group (order 60)
45
- - **F20**: Frobenius group F(5,4) (order 20)
46
 
47
- ### Length Variants
 
48
 
49
- Each group is available with 8 different maximum sequence lengths:
50
- - 2², 2³, 2⁴, 2⁵, 2⁶, 2⁷, 2⁸, 2⁹ (4, 8, 16, 32, 64, 128, 256, 512)
51
 
52
- Each dataset consists of sequences of permutations that need to be composed to produce a target permutation. This is useful for:
53
- - Training models on algebraic reasoning and symbolic computation
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
- # NEW: Clean API - just specify group and max_len
65
- s5_data = load_dataset(
66
- "BeeGass/permutation-groups",
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
- # Backwards compatibility - old style still works
78
- s5_data = load_dataset("BeeGass/permutation-groups", name="s5_data", trust_remote_code=True)
79
- s5_len32 = load_dataset("BeeGass/permutation-groups", name="s5_len32", trust_remote_code=True)
80
 
81
- # Access the data
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
- ## Dataset Structure
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
- The composition follows standard mathematical convention: for input `[p1, p2, p3]`, the result is `p3 ∘ p2 ∘ p1`.
 
 
 
 
 
 
 
 
 
 
97
 
98
- ## Available Configurations
99
 
100
- ### Efficient Loading (Recommended)
101
- Simply specify the group name and optional `max_len` parameter:
102
 
103
  ```python
104
- # Load any group with any max sequence length
105
- dataset = load_dataset("BeeGass/permutation-groups", name="s5", max_len=32, trust_remote_code=True)
 
 
 
 
 
106
  ```
107
 
108
- ### All Groups (30 total)
109
- | Group | Type | Order | Example Usage |
110
- |-------|------|-------|---------------|
111
- | S3-S7 | Symmetric | 6-5040 | `name="s5", max_len=64` |
112
- | A3-A7 | Alternating | 3-2520 | `name="a4", max_len=32` |
113
- | C3-C12 | Cyclic | 3-12 | `name="c8", max_len=16` |
114
- | Z3-Z6 | Cyclic (alt) | 3-6 | `name="z5", max_len=128` |
115
- | D3-D8 | Dihedral | 6-16 | `name="d4", max_len=256` |
116
- | PSL25 | PSL(2,5) | 60 | `name="psl25", max_len=64` |
117
- | F20 | Frobenius | 20 | `name="f20", max_len=32` |
118
- | all | Combined | - | `name="all", max_len=16` |
119
-
120
- ### Legacy Configuration Names
121
- For backwards compatibility, old-style names still work:
122
- - `s5_data` (equivalent to `name="s5"`)
123
- - `s5_len32` (equivalent to `name="s5", max_len=32`)
124
- - etc.
125
-
126
- ## Dataset Features
127
-
128
- - **Variable sequence length**: Input sequences range from 3 to maximum configured length
129
- - **Length-specific variants**: 8 different maximum lengths for each group (2² to 2⁹)
130
- - **Consistent formatting**: All permutations use space-separated integer IDs
131
- - **Metadata included**: Each dataset includes a `metadata.json` file mapping IDs to permutation array forms
132
- - **Train/test split**: 80/20 split for all configurations
133
- - **Scaled sample sizes**: Shorter sequences have more samples for efficient training
134
-
135
- ## Understanding the Data
136
-
137
- Each permutation is represented by a unique integer ID. The `metadata.json` file in each dataset folder provides the mapping from IDs to permutation array forms.
138
-
139
- For example, in S3:
140
- - ID 0 might map to `[0, 1, 2]` (identity)
141
- - ID 1 might map to `[0, 2, 1]` (transpose elements 1 and 2)
142
- - etc.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
 
144
  ## Citation
145
 
146
- If you use this dataset in your research, please cite:
147
 
148
  ```bibtex
149
- @software{permutation_groups_dataset,
150
- author = {Bryan Gass},
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 [William Merrill](https://github.com/viking-sudo-rm) and his paper ["The Illusion of State in State-Space Models"](https://arxiv.org/abs/2404.08819), which explores the computational properties of state-space models through group theory.
161
 
162
  ## License
163
 
@@ -165,4 +200,4 @@ This dataset is released under the MIT License.
165
 
166
  ## Contact
167
 
168
- For questions or issues, please open an issue on the [GitHub repository](https://github.com/BeeGass/permutation-groups).
 
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.