Skip to main content
ACIES

ACIES

Adaptive Perception Control

A decision-theoretic framework for adaptively controlling visual perception to minimize computational cost while maintaining target decision risk.


License: MIT Python 3.10+ Go 1.22+ C++ Tests MNIST


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

ACIES 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}
}

Metadata

Release files for acies 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for acies 0.1.4
File Size Uploaded Provenance Actions
acies-0.1.4.tar.gz 24.9 kB Without provenance Details for acies-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for acies 0.1.4
File Interpreter ABI Platform Actions
acies-0.1.4-py3-none-any.whl Python 3 none any Details for acies-0.1.4-py3-none-any.whl

Total release size: 50.7 kB

Release files / acies-0.1.4.tar.gz

Download URL acies-0.1.4.tar.gz
Size 24.9 kB
Tags Source
SHA-256 checksum
How to use checksums
04ee586e97111b584400f228d6450ea925c18011f97f3b7b7233c3d31a4dcfdb
BLAKE2b-256 checksum
How to use checksums
bac500e5b010f088ea9999d915f1441c44e442c5a2d9443dd3ba4fcefd7a93f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / acies-0.1.4-py3-none-any.whl

Download URL acies-0.1.4-py3-none-any.whl
Size 25.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b294f8102db4c227596b1e2832e994cbf9d2a8a2e2408dabbab9f9ae9f0fed4
BLAKE2b-256 checksum
How to use checksums
2676149998b61881baca5bc25de0f3c647283e82cbe48d099fec94a1aa766a6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for acies 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page