POC: AI PDP Design in Policy Framework

POC: AI PDP Design in Policy Framework

This page outlines the high level initial ideas on implementing a PDP in Policy Framework with AI capabilities. The new PDP will be implemented as a spring boot microservice with an AI module for the business logic implementation. The pdp will be managed by PAP in the Policy Framework.

Various implementation options are briefly discussed in the upcoming sections for the further analysis.

1. Predictive PDP

This PDP might use ML models to predict the future state of the network based on the learned patterns from historical data.

This can use a trained ML model and make predictions. Training data required to be supplied to learn the patterns based on the use case.

Sample input:

{ "cpuUsage": [0.6, 0.65, 0.7], "memoryUsage": [0.5, 0.55, 0.6], "networkTraffic": [80, 90, 95] }

Possible output based on the learned models:

{ "prediction": "OVERLOAD_RISK", "probability": 0.87, "recommendedAction": "Scale up VNFs or reroute traffic" }

 

Maven artifacts for ML libraries: Smile ML, Weka

Suitability: May be good for Fault management, autoscaling etc..

Cons: Needs trained ML models. More input models for better prediction. Risk of misprediction.

 

2. Anomaly Detection PDP

This is similar to Predictive pdp but uses an unsupervised ML algorithm instead of trained models. Only the normal data input is provided and no thresholds are defined. The anomaly detection is based on the Ai algorithm configured. This can act as an alert system that flags unusual network activities.

This can be a continuous monitoring component which receives continuous input feeds from NFs. If an anomaly is predicted, this can be used to raise an alarm, auto-scaling, healing etc..

Sample input data:

{ "cpuUsage": [0.3, 0.62, 0.71], "memoryUsage": [0.45, 0.46, 0.44], "packetLoss": [0.01, 0.02, 0.05] }

Possible action:

{ "anomalyDetected": true, "reason": "CPU usage spike and packet loss > threshold", "recommendedAction": "Trigger remediation workflow via Apex PDP" }

Maven artifacts for ML libraries: Smile ML, Weka

Suitability: Can be used for alert management and can be combined with other pdps for alert-response.

This requires only normal data and the configured algorithm can detect the abnormality automatically.

Cons: Needs normal models for learning.

 

3. Optimization PDP

This can use reinforcement learning (RL) / optimization algorithms to select best action among many valid options.

Reinforced Learning is different from supervised learning. Instead of making decisions based on the trained models, the agent learns by interacting with an environment. We define the following in the business logic and the Ai takes the decision.

constraints (rules that must never be violated)

Example:

  • CPU utilization ≤ 80%

objective (define what best means among feasible actions)

Example:

  • Minimize total cost

  • Maximize throughput

  • Minimize latency

Current state/ input data:

Example:

Metrics from NFs, SDN, or monitoring system.

 

How the PDP works :

Takes an action → gets a reward/Penalty based on the consequence → Updates policy.

Can be used to make decisions on use cases like optimal configuration or action, resource allocation, etc.. Learns and improves decisions over time.

Sample input:

{ "cpuUsage": 0.85, "latency": 75, "traffic": 1500 }

Optimization logic is deciding

  • Action A: Scale out NF

  • Action B: Do nothing

PDP Decision:

Scale out NF by +1 instance.

After Action(from monitioring)

{ "cpuUsage": 0.55, "latency": 45, "traffic": 1500 }

Reward Function:

Reward = (latency improvement + cpu improvement) → +15. If PDP had choseen "Do Nothing" CPU might stay at 0.85, latency at 75. Reward = -5 (penalty).

Maven artifacts for RL library: OptaPlanner from Red Hat

Suitability: can be used for various usecases.

Cons: Might be non deterministic as it learns based on the consequence.

 

What could be the Tosca policy definition for AI PDPs:

The tosca policy definition might include the following instead of the hardcoded logic.

  • Use this PDP type (Predictive/Anomaly/Optimization).

  • Use this trained AI model (location, version or module name).

  • Use these input data sources (metrics, telemetry).

  • Define the expected output contract (prediction, decision, anomaly score).

policies: - predictive_scale_policy: type: onap.policies.optimization.Predictive properties: modelRef: "models/cpu_predictor_v1.pkl" dataSource: "dcae:vm_metrics" outputFormat: "prediction,confidence,recommendedAction"

 

Thoughts on the pros and cons of AI based PDPs:

Having a PDP with AI capabilities can be used for purposes like alarms, notifications, network predictions in advance etc..

Making decisions/action points on the network from the AI module may cause high unpredictability and inconsistent behavior.

Training the AI models may be more challenging.

Right use case should be determined where the AI capability in the PDP adds a real value.