什麼是gpt-oss-safeguard?OpenAI的策略驅動安全模型

什麼是gpt-oss-safeguard?OpenAI的策略驅動安全模型

文章目录

  • 什麼是gpt-oss-safeguard?
  • 如何訪問?
  • 實踐操作:在我們自己的策略上測試模型
  • 基準測試:gpt-oss-safeguard的效能表現
  • 內部稽覈評估
  • 外部稽覈評估
  • 侷限性
  • gpt-oss-safeguard應用案例
  • 小結

gpt-oss-safeguard

告別內容稽覈吧!一種全新的開放模型橫空出世,它們能夠真正理解你的規則,而不是盲目猜測。隆重介紹 gpt-oss-safeguard:這些模型能夠解讀你的規則,並以清晰的推理過程強制執行。無需大規模重新訓練,也無需黑箱安全呼叫。取而代之的是,由你掌控的靈活開放的系統。在本文中,我們將深入剖析 safeguard 模型是什麼、它們如何運作、它們的優勢(以及不足之處),並指導你如何立即開始測試自己的策略。

什麼是gpt-oss-safeguard?

這些模型基於 gpt-oss 架構構建,總共擁有 200 億個引數(另一個變體擁有 1200 億個引數),並針對安全分類任務進行了專門的微調,同時支援 Harmony 響應格式。Harmony 響應格式將推理過程分離到專用通道中,以提高可審計性和透明度。該模型體現了 OpenAI 對深度防禦的理念。

什麼是gpt-oss-safeguard?

Source: OpenAI

該模型同時接收兩個輸入:

  1. 策略(~系統指令)
  2. 作為該策略目標的內容(~查詢)

處理完這些輸入後,模型會得出關於內容歸屬的結論,並給出相應的推理。

如何訪問?

您可以在 Hugging Face 的 HuggingFace Collections 中訪問 gpt-oss-safeguard 模型。或者,您也可以透過提供 Playground 的線上平臺訪問,例如 GroqOpenRouter 等。

本文中的演示均在 Groq 提供的 gpt-oss-safeguard Playground 上完成。

Groq 提供的 gpt-oss-safeguard

Source: Groq

實踐操作:在我們自己的策略上測試模型

為了測試模型(20b 變體)在輸出清理中對策略的理解和運用情況,我使用一條專門用於過濾動物名稱的策略對其進行了測試:

Policy: Animal Name Detection v1.0ObjectiveDecide if the input text contains one or more animal names. Return a label and the list of detected names.LabelsANIMAL_NAME_PRESENT — At least one animal name is present.ANIMAL_NAME_ABSENT — No animal names are present.UNCERTAIN — Ambiguous; the model cannot confidently decide.DefinitionsAnimal: Any member of kingdom Animalia (mammals, birds, reptiles, amphibians, fish, insects, arachnids, mollusks, etc.), including extinct species (e.g., dinosaur names) and zodiac animals.What counts as a “name”: Canonical common names (dog, African grey parrot), scientific/Latin binomials (Canis lupus), multiword names (sea lion), slang/colloquialisms (kitty, pup), and animal emojis (🐶, 🐍).Morphology: Case-insensitive; singular/plural both count; hyphenation and spacing variants count (sea-lion/sea lion).Languages: Apply in any language; if the word is an animal in that language, it counts (e.g., perro, gato).Exclusions / DisambiguationSubstrings inside unrelated words do not count (cat in “catastrophe”, ant in “antique”).Food dishes or products only count if an animal name appears as a standalone token or clear multiword name (e.g., “chicken curry” → counts; “hotdog” → does not).Brands/teams/models (Jaguar car, Detroit Lions) count only if the text clearly references the animal, not the product/entity. If ambiguous → UNCERTAIN.Proper names/nicknames (Tiger Woods) → mark ANIMAL_NAME_PRESENT (animal token “tiger” exists), but note it’s a proper noun.Fictional/cryptids (dragon, unicorn) → do not count unless your use case explicitly wants them. If unsure → UNCERTAIN.Required Output Format (JSON){  "label": "ANIMAL_NAME_PRESENT | ANIMAL_NAME_ABSENT | UNCERTAIN",  "animals_detected": ["list", "of", "normalized", "names"],  "notes": "brief justification; mention any ambiguities",  "confidence": 0.0}Decision RulesTokenize text; look for standalone animal tokens, valid multiword animal names, scientific names, or animal emojis.Normalize matches (lowercase; strip punctuation; collapse hyphens/spaces).Apply exclusions; if only substrings or ambiguous brand/team references remain, use ANIMAL_NAME_ABSENT or UNCERTAIN accordingly.If at least one valid match remains → ANIMAL_NAME_PRESENT.Set confidence higher when the match is unambiguous (e.g., “There’s a dog and a cat here.”), lower when proper nouns or brands could confuse the intent.Examples“Show me pictures of otters.” → ANIMAL_NAME_PRESENT; ["otter"]“The Lions won the game.” → UNCERTAIN (team vs animal)“I bought a Jaguar.” → UNCERTAIN (car vs animal)“I love 🐘 and giraffes.” → ANIMAL_NAME_PRESENT; ["elephant","giraffe"]“This is a catastrophe.” → ANIMAL_NAME_ABSENT“Cook chicken with rosemary.” → ANIMAL_NAME_PRESENT; ["chicken"]“Canis lupus populations are rising.” → ANIMAL_NAME_PRESENT; ["canis lupus"]“Necesito adoptar un perro o un gato.” → ANIMAL_NAME_PRESENT; ["perro","gato"]“I had a hotdog.” → ANIMAL_NAME_ABSENT“Tiger played 18 holes.” → ANIMAL_NAME_PRESENT; ["tiger"] (proper noun; note in notes)

查詢: “The quick brown fox jumps over the lazy dog.”

回覆:

結果正確,並按照我之前概述的格式提供。我本可以進行更極端的測試,但有限的測試本身已經令人滿意。此外,由於模型的一個限制(詳見“限制”部分),使用密集型模型行不通。

基準測試:gpt-oss-safeguard的效能表現

我們使用 OpenAI 的內部和外部評估資料集對 safeguard 模型進行了評估。

內部稽覈評估

內部稽覈評估 

Source: OpenAI

safeguard 模型和內部安全推理器在多策略準確率方面優於 gpt-5-thinking 和 gpt-oss 開源模型。考慮到 safeguard 模型的引數數量較少,其效能優於 gpt-5-thinking 尤其令人驚訝。

外部稽覈評估

ToxicChat 測試

Source: OpenAI

在 ToxicChat 測試中,內部開發的 Safety Reasoner 排名最高,其次是 gpt-5-thinking。這兩個模型都略微優於 gpt-oss-safeguard-120b 和 20b。儘管如此,由於其體積更小、部署效率更高(與那些龐大的模型相比),safeguard 仍然適用於此任務。

OpenAI 的內部安全模型

Source: OpenAI

使用內部安全策略,gpt-oss-safeguard 的效能略優於其他測試模型,包括內部開發的 Safety Reasoner(OpenAI 的內部安全模型)。與 Safety Reasoner 的差距並不具有統計學意義,但 safety 在該基準測試中領先。

侷限性

  • 效能低於專用分類器:專為故障保護和內容稽覈設計的分類器效能遠超安全防護模型。
  • 計算成本:與輕量級分類器相比,這些模型需要更多的計算資源(時間、硬體)。如果可擴充套件性是必要條件,這一點尤其令人擔憂。
  • 推理鏈中的錯覺:即使結論令人信服,也不能保證其推理過程完全正確。如果策略較為簡短,這種情況尤為突出。可疑的推理卻得出了正確的結論:

可疑的推理卻得出了正確的結論

  • 多語言相容性缺陷:安全保障模型的有效性僅限於英語這種通用語言。因此,如果您的內容或政策環境涵蓋英語以外的其他語言,則可能會出現效能下降的情況。

gpt-oss-safeguard應用案例

以下是此基於策略的安全機制的一些應用案例:

  • 信任與安全內容稽覈:結合上下文審查使用者內容,發現違規行為,並整合到即時稽覈系統和稽覈工具中。
  • 基於策略的分類:直接應用已編寫的策略來指導決策,無需重新訓練即可即時更改規則。
  • 自動化分診和稽覈助手:作為推理輔助工具,解釋決策、引用所用準則,並將疑難案例上報給人工稽覈。
  • 策略測試和實驗:預覽新規則的執行效果,在真實環境中測試不同版本,並及早發現不明確或過於嚴格的策略。

小結

這是朝著安全可靠的LLM(語言學習模型)邁出的正確一步。就目前而言,它並沒有什麼實際意義。該模型顯然是為特定使用者群體量身定製的,並非面向普通使用者。對於大多數使用者來說,Gpt-oss-safeguard 可以與 gpt-oss 相提並論。但它為未來開發安全響應機制提供了一個有用的框架。與其說它是一個完整的模型,不如說它是gpt-oss的版本升級。但它所提供的,是在無需大量硬體的情況下,實現安全模型使用的承諾。

評論留言