ACIES
Adaptive Perception Control
A decision-theoretic framework for adaptively controlling visual perception to minimize computational cost while maintaining target decision risk.
Perception is not a fixed pipeline. It is a resource to control.
Why ACIES?
Every perception system wastes resources processing information that doesn't change the decision. ACIES solves this by treating perception as a cost-risk optimization problem.
| Without ACIES | With ACIES | |
|---|---|---|
| Resolution | Fixed (max) | Adaptive (optimal) |
| Cost | 385.8 | 93.6 |
| Accuracy | 98.8% | 90.8% |
| Savings | — | 76% |
Trade 8% accuracy for 76% cost reduction. Or tune the threshold to find your own sweet spot.
Quick Start
Python (stdlib only, zero dependencies)
from acies import APCController, APCConfig, HardwareProfile
apc = APCController(APCConfig(
confidence_threshold=0.92,
hardware=HardwareProfile.jetson_orin(),
))
def clarity_fn(action):
clarities = {
"64p": 0.55, "128p": 0.65, "224p": 0.75,
"320p": 0.82, "512p": 0.88, "1024p": 0.93,
"crop_224": 0.85, "crop_320": 0.90, "crop_512": 0.92,
}
return clarities.get(action.name, 0.5)
result = apc.run(true_class=1, clarity_fn=clarity_fn)
print(f"Decision: {result.decision} | Cost: {result.total_cost:.1f} | Steps: {result.n_steps}")
Go CLI (32,800 runs/sec)
go build -o acies-cli .
./acies-cli run --hardware jetson --verbose
./acies-cli bench --iterations 5000 --hardware rpi
Docker
docker build -t acies .
docker run acies bench --iterations 1000
Installation
git clone https://github.com/NICE-DEV226/ACIES.git
cd ACIES
| Component | Command | Notes |
|---|---|---|
| Python | (none) | stdlib only, zero deps |
| C++ accelerator | cd cpp && make |
Optional, 3-5x speedup |
| Go CLI | go build -o acies-cli . |
Single binary |
| Docker | docker build -t acies . |
Multi-stage, all-in-one |
Verify:
python3 test_apc.py # 8/8 tests
./acies-cli version # ACIES v0.1.0
Architecture
Control loop: Sample → Score (ΔR/C) → Adjust → Filter → Execute → Observe → Update → Repeat
How It Works
| Step | Component | What it does |
|---|---|---|
| 1 | Belief Tracking | Maintains P(Y=1 | observations) via Bayesian filtering |
| 2 | Clarity Estimation | Thompson Sampling learns P(correct | action) online |
| 3 | Action Scoring | Computes ΔR/C (risk reduction per cost) for each action |
| 4 | Conviction | Anti-oscillation boosts high-clarity actions near threshold |
| 5 | Safety Filtering | Rejects actions that could exceed risk threshold |
| 6 | Change-Point Detection | Resets posteriors on distribution shifts |
| 7 | Decision | Stops when confidence ≥ threshold or max steps reached |
Benchmarks
MNIST (10,000 real images)
python3 examples/real_benchmark.py
| Method | Accuracy | Cost | Savings |
|---|---|---|---|
| Fixed 1024p | 98.8% | 385.8 | — |
| ACIES | 90.8% | 93.6 | 76% |
| Fixed 224p | 82.1% | 76.5 | 80% |
| Random | 95.5% | 149.6 | 61% |
Go CLI Performance
./acies-cli bench --iterations 5000
32,800 runs/sec — 70× faster than Python (476 images/sec)
Hardware Profiles
| Profile | APC Cost | Fixed 1024p | Savings |
|---|---|---|---|
| Default | 260.9 | 448.4 | 42% |
| Jetson Orin | 204.4 | 347.1 | 41% |
| Raspberry Pi 5 | 287.5 | 525.2 | 45% |
| Desktop GPU | 290.6 | 479.0 | 39% |
| Edge TPU | 53.4 | 92.0 | 42% |
Testing
python3 test_apc.py
| # | Test | Description | Result |
|---|---|---|---|
| 1 | Base functionality | Accuracy, cost, exploration | ✓ |
| 2 | Hard tasks | High difficulty scenarios | ✓ |
| 3 | Distribution shift | Thompson adaptation | ✓ |
| 4 | Sensor failure | Degraded reliability | ✓ |
| 5 | Hardware profiles | All 5 profiles | ✓ |
| 6 | Stress test | 5,000 iterations | ✓ |
| 7 | Belief math | Bayesian verification | ✓ |
| 8 | Thompson convergence | Posterior accuracy | ✓ |
Project Structure
ACIES/
├── acies/ # Python package (8 modules)
│ ├── controller.py # Main APC loop
│ ├── belief.py # Bayesian belief tracker
│ ├── clarity_learner.py # Thompson Sampling
│ ├── safety.py # Risk guarantees
│ ├── conviction.py # Anti-oscillation
│ ├── change_point.py # BOCPD shift detection
│ ├── actions.py # Action space & HW profiles
│ └── accelerator.py # C++ ctypes wrapper
│
├── cpp/ # C++ core library
│ ├── belief.h/.cpp # Belief state
│ ├── clarity_learner.* # Thompson Sampling
│ ├── acies.h/.cpp # C API
│ └── Makefile
│
├── core.go # Go implementation
├── main.go # Go CLI (run/bench/config)
│
├── test_apc.py # 8 robustness tests
├── examples/ # Benchmarks & demos
├── docs/ # 9 documentation files
├── assets/ # Logo & visual identity
├── Dockerfile # Multi-stage build
└── README.md
Documentation
| Doc | Description |
|---|---|
| Installation | Setup guide for Python, Go, C++, Docker |
| Architecture | Deep dive into control loop and algorithms |
| Configuration | All configuration parameters |
| CLI Reference | Go CLI commands and flags |
| Python API | Complete Python API reference |
| C++ API | C API for FFI (Python/Go/Rust) |
| Examples | 10 usage examples |
| Benchmarks | Performance results on MNIST |
| Contributing | Development guide |
Tech Stack
| Layer | Tech | Performance |
|---|---|---|
| CLI | Go | 32,800 runs/sec |
| Core | Python (stdlib) | 476 images/sec |
| Accelerator | C++ via ctypes | 3-5× Python speed |
| Tests | 8 robustness tests | all passing |
| Benchmark | 5 methods × 5 HW profiles | + MNIST 10k |
| Deploy | Multi-stage Dockerfile | Python + Go + C++ |
Contributing
See docs/contributing.md.
License
MIT License — see LICENSE.
Citation
@software{acies2026,
title = {ACIES: Adaptive Perception Control},
year = {2026},
url = {https://github.com/NICE-DEV226/ACIES}
}
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file acies-0.1.0.tar.gz.
File metadata
- Download URL: acies-0.1.0.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1eba3bc8817e75102d1081c33f883429f7c5a08c1781a6d9a6f9291bbdf2038
|
|
| MD5 |
ceabe38b142e8084c1e92bc9909bb111
|
|
| BLAKE2b-256 |
5124f4579dd74d53d01e354cb63e1193c0ec4942e5a2556d9c54266ad12f4c24
|
File details
Details for the file acies-0.1.0-py3-none-any.whl.
File metadata
- Download URL: acies-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf49d4be73905ab13038f44c14f3a96c42fc7a423651d7462a57c85f8019960b
|
|
| MD5 |
be5e4b9933f8a7793526f5da6e734c89
|
|
| BLAKE2b-256 |
1bfcc8d3d377d0a843fa388b470c8c9437db17b0cdbc67f003b8d087132d2b85
|