Start with what the system can do
In conversations about AI security, I often hear prompt injection, data leakage, and governance come up first. Before choosing controls, I ask a simpler question. What are we trying to secure? A fraud detection model that scores transactions, an assistant that drafts replies, and an agent that updates customer records give us three very different answers.
Artificial intelligence is the broad field. Machine learning is one branch, where models learn patterns from data. Deep learning is a type of machine learning that uses neural networks with multiple layers. Generative AI describes a capability, such as producing text, code, or images. Agentic AI describes a way to design a system that pursues a goal and may use tools. An assistant can generate a reply while an agent may also send it. That difference changes what you need to authorize, log, and review.
How models learn and why it matters
Application developers still write rules such as checking a user’s permissions. A machine learning model adds behavior learned from examples. Those learned patterns are represented by numerical parameters, often called weights. A code review can tell you whether the application makes a permission check. To understand how the model behaves, you also need to know where its data came from and evaluate it on examples that reflect the conditions it will face.
The way a model learns shapes what you need to verify. In supervised learning, a spam filter might learn from emails already labeled as legitimate or unwanted, so the accuracy and origin of the labels matter. In unsupervised learning, a monitoring system can flag sign-in patterns that differ from past activity. An analyst still needs context to decide why the activity changed. In reinforcement learning, a system learns from rewards tied to its actions. Rewarding an IT support system for closing tickets quickly can conflict with the goal of giving people a lasting fix.
Many language models are first trained using self-supervised learning. For example, a model can learn to predict the next piece of text by using the text itself to supply the expected answer. That lets developers work with large collections of data without labeling each example by hand. The provenance and suitability of that data still matter, especially when an organization trains or adapts a model on its own documents.
Training and inference have different risks
Training adjusts a model’s parameters using data. During ordinary inference those parameters stay fixed while the model produces a result, such as a fraud score or an answer to a question. Entering a prompt is typically inference. A provider may separately retain or use conversation data depending on the agreement and settings, so check those before allowing sensitive input.
During training, focus on who can change datasets, pipelines, and model artifacts, and how those changes are verified. Keep records of dataset and model versions so you can trace unexpected behavior back to a release. During inference, focus on who can call the service, which data reaches the model, and what the application does with the output. If you buy a hosted model, the provider generally controls the training pipeline. You still need evidence about the model’s origin and handling of data, and you own the controls around the way your application uses it.
Follow the data through the whole architecture
Many language models use a transformer architecture. Its attention mechanism helps the model capture relationships within the input. In an enterprise assistant, that input can combine a person’s question, application instructions, and text pulled from documents. Retrieved text can contain instructions of its own. Enforce access permissions in the retrieval layer and authorize tool calls in the application, independently of the model’s output.
Take a company assistant that answers HR questions. The sign-in flow establishes who the employee is. The search service needs to enforce which documents that person can read before passing any excerpts to the model. The application needs a separate permission check if it can submit an HR request. Operations teams need enough visibility to investigate failures and a way to disable an integration when needed. Those responsibilities can belong to different teams, so put them on the same architecture diagram.
Include the model, libraries, and compute platform in the review. Ask where the model came from, how updates are approved, and which versions are running. If workloads share compute infrastructure, check what the platform isolates between workloads. The same principles we already use for enterprise systems apply here, including least privilege, change control, and monitoring.
Try this in your next architecture review
Pick one AI feature and draw the path of a single request, from the person who starts it to the systems affected by its response. Mark the places where data, permissions, or responsibility change hands. That sketch gives you a concrete starting point for the security review.
- Show where the input comes from, what the model receives, and what gets stored.
- Mark where permissions are enforced and which tools the system can use.
- Name who can investigate unexpected behavior, disable an integration, or roll back a change.
Further reading
- NIST AI Risk Management Framework
- NIST Adversarial Machine Learning Taxonomy
- Attention Is All You Need, Vaswani et al.
This article draws on Thameem Ansari’s AI Security Study Guide, Complete Edition V1, Section 1.1.