{"data":{"kind":"file","path":"README.md","version_id":"sxyvxelo682ku36lsducgqfi","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":3861,"modified_at":"2026-08-30T13:54:21.679000","content_hash":"a5d8dbbd9b2c57553e8533cd5836299fc52b75dfec8531e34a548f30a4661684"},"entries":[],"content":"# Neural Architecture Search Toy Environment (v1.1.1)\n\nA reinforcement learning environment that trains language models to design optimal neural network architectures through structured search over layer configurations, connectivity patterns, and hyperparameters.\n\n## Overview\n\nThis environment simulates the Neural Architecture Search (NAS) problem as a text-based decision task. The LLM agent must propose neural network architectures in a structured format, which are then evaluated against multiple quality criteria including validity, efficiency, expressiveness, and task fitness.\n\n## Task Design\n\nThe agent receives a target task specification (e.g., image classification, sequence modeling) and must propose a complete neural architecture in JSON format. The architecture is evaluated across multiple dimensions:\n\n### Evaluation Dimensions\n\n| Metric | Weight | Description |\n|--------|--------|-------------|\n| **Structural Validity** | 0.25 | Architecture forms a valid computational graph (no cycles, proper connections, valid layer types) |\n| **Parameter Efficiency** | 0.20 | Parameter count within budget constraints; penalizes both over-budget and extreme under-parameterization |\n| **Depth-Width Balance** | 0.15 | Appropriate ratio of depth to width for the target task complexity |\n| **Layer Diversity** | 0.15 | Variety of layer types used (conv, attention, pooling, normalization) |\n| **Task Fitness** | 0.25 | Architecture matches the target task requirements (CNN for vision, attention for sequences, etc.) |\n\n### Anti-Gaming Design\n\n- **Multi-signal validation**: Each metric requires multiple independent sub-conditions\n- **Sigmoid smoothing**: Continuous reward curves prevent threshold exploitation\n- **Structural graph validation**: AST-level parsing prevents syntactically valid but semantically meaningless architectures\n- **Dynamic task rotation**: Target tasks change per evaluation to prevent template memorization\n\n## Architecture Format\n\nThe agent must output architectures in this JSON structure:\n\n```json\n{\n  \"name\": \"MyNet\",\n  \"layers\": [\n    {\"type\": \"conv2d\", \"params\": {\"filters\": 64, \"kernel_size\": 3, \"activation\": \"relu\"}},\n    {\"type\": \"batch_norm\", \"params\": {}},\n    {\"type\": \"max_pool\", \"params\": {\"pool_size\": 2}},\n    {\"type\": \"dense\", \"params\": {\"units\": 128, \"activation\": \"relu\"}},\n    {\"type\": \"dropout\", \"params\": {\"rate\": 0.3}},\n    {\"type\": \"dense\", \"params\": {\"units\": 10, \"activation\": \"softmax\"}}\n  ],\n  \"connections\": \"sequential\",\n  \"optimizer\": {\"name\": \"adam\", \"lr\": 0.001}\n}\n```\n\n## Difficulty Levels\n\n| Level | Description | Constraints |\n|-------|-------------|-------------|\n| 0 | Simple MLP | 2-4 layers, <10K params |\n| 1 | Basic CNN | 5-8 layers, <100K params, must include conv+pool |\n| 2 | Residual Network | 8-15 layers, <500K params, skip connections required |\n| 3 | Multi-branch | 10-20 layers, <1M params, parallel branches |\n| 4 | Full Architecture | 15-30 layers, <5M params, attention + conv hybrid |\n\n## Usage\n\n```python\nimport verifiers as vf\n\n# Load with default settings\nenv = vf.load_environment(\"nas-toy-env\")\n\n# Load with specific difficulty\nenv = vf.load_environment(\"nas-toy-env\", level=2, max_params=500000)\n\n# Evaluate\nresults = env.evaluate(model=\"your-model\")\n```\n\n## Research Applications\n\n- **Architecture design automation**: Train models to propose efficient architectures\n- **Reward hacking studies**: Multiple proxy vs true metric pairs for studying reward gaming\n- **Transfer learning**: Test if learned architecture design generalizes across task domains\n- **Curriculum learning**: Progressive difficulty from simple MLPs to complex hybrid architectures\n\n## Citation\n\n```bibtex\n@software{nas_toy_env_2026,\n  title = {Neural Architecture Search Toy Environment},\n  author = {Prime Intellect Community},\n  version = {1.1.1},\n  year = {2026}\n}\n```\n\n## License\n\nMIT\n","encoding":"utf-8","truncated":false,"total_bytes":3861},"status":null}