ProxylessNAS<T>

Models & Types · AiDotNet.AutoML.NAS

ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware. Uses path binarization and latency-aware loss to search directly on the target device without requiring a proxy task or separate hardware lookup tables.

Reference: “ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware” (ICLR 2019)

Inheritance: AutoMLModelBase<T, Tensor<T>, Tensor<T>> → NasAutoMLModelBase<T> → ProxylessNAS<T>

For Beginners

ProxylessNAS searches for architectures directly on the target task and hardware, eliminating the need for proxy tasks. Most NAS methods search on small datasets then transfer, but ProxylessNAS searches on the full task. Think of it as test-driving cars on the actual roads you will drive rather than a parking lot. It uses path binarization to keep memory usage manageable.

Example

var searchSpace = new SearchSpaceBase<float>();
var nas = new ProxylessNAS<float>(searchSpace, numNodes: 4, targetPlatform: HardwarePlatform.Mobile);
Architecture<float> architecture = nas.DeriveArchitecture();
HardwareCost<float> cost = nas.EstimateArchitectureCost(inputChannels: 32, spatialSize: 224);

Constructors

Constructor Summary
ProxylessNAS(SearchSpaceBase<T> searchSpace, int numNodes, HardwarePlatform targetPlatform, double latencyWeight, bool useBinarization)

Methods

Method Summary
Architecture<T> DeriveArchitecture() Derives the final discrete architecture by selecting operations with highest weights
HardwareCost<T> EstimateArchitectureCost(int inputChannels, int spatialSize) Estimates the final architecture’s hardware cost
List<Matrix<T>> GetArchitectureGradients() Gets architecture gradients
List<Matrix<T>> GetArchitectureParameters() Gets architecture parameters for optimization
Matrix<T> BinarizePaths(Matrix<T> alpha) Applies path binarization for memory-efficient single-path sampling.
T ComputeExpectedLatency(int inputChannels, int spatialSize) Computes the expected latency cost of the architecture
T ComputeTotalLoss(T taskLoss, int inputChannels, int spatialSize) Computes the total loss including task loss and latency regularization
void SetBinarizationTemperature(double temperature) Sets the binarization temperature