πŸ”’ CyberGuard AI - Security Log Analyzer

Model Description

CyberGuard AI is a fine-tuned language model specialized in analyzing cybersecurity logs and identifying potential security threats. Built on Llama-2-7B and trained using Unsloth for efficient fine-tuning.

Developed by: omasteam

🎯 Model Capabilities

  • Threat Classification: Categorizes logs as Normal, Suspicious, or Malicious
  • Confidence Scoring: Provides confidence levels for classifications
  • Detailed Analysis: Offers comprehensive reasoning for each assessment
  • Actionable Recommendations: Suggests appropriate security responses

πŸ“Š Classification Categories

🟒 Normal

  • Routine system operations
  • Standard user activities
  • Expected network traffic
  • Scheduled maintenance events

🟑 Suspicious

  • Unusual access patterns
  • Failed authentication attempts
  • After-hours activities
  • Anomalous data transfers

πŸ”΄ Malicious

  • Active attack indicators
  • Malware signatures
  • SQL injection attempts
  • Data exfiltration patterns

πŸš€ Quick Start

from unsloth import FastLanguageModel

# Load the model
model, tokenizer = FastLanguageModel.from_pretrained(
    "{omasteam}/{cyberguard-ai-security-analyzer}",
    max_seq_length=2048,
    dtype=None,
    load_in_4bit=True,
)

# Set to inference mode
FastLanguageModel.for_inference(model)

# Analyze a security log
messages = [
    {{
        "role": "system",
        "content": "You are CyberGuard AI, an expert cybersecurity analyst. Analyze security logs and classify them as 'normal', 'suspicious', or 'malicious'."
    }},
    {{
        "role": "user",
        "content": "Analyze this security log: Multiple failed login attempts from IP 192.168.1.100"
    }}
]

inputs = tokenizer.apply_chat_template(
    messages, 
    tokenize=True, 
    add_generation_prompt=True, 
    return_tensors="pt"
)

outputs = model.generate(
    input_ids=inputs,
    max_new_tokens=256,
    temperature=0.3,
    do_sample=True
)

response = tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True)
print(response)

πŸ”§ Training Details

Training Data

  • Dataset Size: 150 security log examples
  • Categories: Normal (50), Suspicious (50), Malicious (50)
  • Format: Conversational training with system prompts

Training Configuration

  • Base Model: Llama-2-7B-Chat
  • Training Method: LoRA (Low-Rank Adaptation)
  • Training Steps: 60
  • Learning Rate: 2e-4
  • Batch Size: 2 (with gradient accumulation)

Training Framework

  • Framework: Unsloth (optimized training)
  • Quantization: 4-bit for memory efficiency
  • Hardware: Google Colab GPU

πŸ“ˆ Performance

The model demonstrates strong performance in:

  • Threat Detection: High accuracy in identifying malicious activities
  • False Positive Reduction: Balanced classification to minimize alerts
  • Contextual Understanding: Considers temporal and behavioral patterns
  • Response Quality: Provides detailed, actionable analysis

⚠️ Limitations

  • Trained on synthetic security log data
  • May require fine-tuning for specific environments
  • Performance varies with log format complexity
  • Best used as part of broader security monitoring

🎯 Intended Use

Primary Applications

  • Security Information and Event Management (SIEM)
  • Log analysis automation
  • Threat detection and classification
  • Security monitoring workflows

Out of Scope

  • Real-time critical security decisions without human oversight
  • Standalone security solution
  • Legal or compliance determinations

πŸ“ Citation

If you use this model in your research or applications, please cite:

@misc{{cyberguard-ai-2024,
  author = {{{omasteam}}},
  title = {{CyberGuard AI: Fine-tuned Security Log Analyzer}},
  year = {{2024}},
  publisher = {{Hugging Face}},
  journal = {{Hugging Face Model Hub}},
  howpublished = {{\\url{{https://huggingface.co/{omasteam}/{cyberguard-ai-security-analyzer}}}}}
}}

🀝 Contributing

Contributions, suggestions, and feedback are welcome! Please open an issue or submit a pull request.

πŸ“„ License

This model is released under the Apache 2.0 License.

πŸ™ Acknowledgments

  • Unsloth Team: For the efficient training framework
  • Hugging Face: For the model hosting platform
  • Meta AI: For the base Llama-2 model

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for omasteam/cyberguard-ai-security-analyzer

Finetuned
(65)
this model