Documentation
¶
Index ¶
- type ActivationType
- type AggregatedUpdate
- type AggregationStrategy
- type AnonymizationLevel
- type AttackRecord
- type CertificateStore
- type ComparisonOperator
- type CompressionType
- type ComputeCapacity
- type Condition
- type ConditionType
- type Connection
- type ConsensusEngine
- type ConsensusResult
- type ConsensusRule
- type ConsensusType
- type ConsentType
- type ContributionRecord
- type ConvergenceStatus
- type CoordinatorNode
- type CredentialValidationResult
- type CrossValidationResults
- type DataSharingLevel
- type DecisionType
- type DifferentialPrivacyEngine
- type DifferentialPrivacyParameters
- type DistributedKnowledgeGraph
- type EncryptionType
- type FailurePattern
- type FederatedAttackLearningEngine
- func (e *FederatedAttackLearningEngine) JoinFederatedNetwork(ctx context.Context, nodeRequest *NodeJoinRequest) (*FederatedNode, error)
- func (e *FederatedAttackLearningEngine) ProcessLocalUpdates(ctx context.Context, roundID string) (*AggregatedUpdate, error)
- func (e *FederatedAttackLearningEngine) StartFederatedLearningRound(ctx context.Context, participants []*FederatedNode, ...) (*FederatedRound, error)
- type FederatedLearningType
- type FederatedMessage
- type FederatedNode
- type FederatedNodeManager
- type FederatedRound
- type GlobalAttackModel
- type GlobalMetrics
- type HomomorphicCryptographyEngine
- type LatencyMetrics
- type Layer
- type LayerType
- type LocalAttackData
- type LocalAttackModel
- type LocalUpdate
- type MessageQueue
- type MessageType
- type ModelAggregationEngine
- type ModelStructure
- type ModelType
- type NetworkProfile
- type NetworkTopology
- type NodeCredentials
- type NodeJoinRequest
- type NodeType
- type NoiseType
- type PatternType
- type PerformanceMetrics
- type Priority
- type PrivacyLevel
- type PrivacyMechanism
- type PrivacyNoise
- type PrivacyPreferences
- type PrivacyPreservationEngine
- type QualityCheck
- type QualityCheckType
- type QueueType
- type ReputationSystem
- type RoundMetrics
- type RoundStatus
- type RoutingProtocol
- type RuleType
- type SecureCommunicationLayer
- type StatisticalTest
- type StatisticalTestType
- type SuccessPattern
- type TargetProfile
- type TechniqueRecord
- type TrainingRecord
- type TrainingRequest
- type TrustLevel
- type ValidationResults
- type VotingMechanism
- type VulnerabilityRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivationType ¶
type ActivationType int
const ( ReLU ActivationType = iota Sigmoid Tanh Softmax LeakyReLU ELU GELU Swish )
type AggregatedUpdate ¶
type AggregationStrategy ¶
type AggregationStrategy int
const ( FederatedAveraging AggregationStrategy = iota SecureAggregation_Strategy DifferentialPrivateAggregation HomomorphicAggregation TrustedExecutionAggregation MultiPartyComputation ZeroKnowledgeAggregation BlockchainBasedAggregation ConsensusBasedAggregation AdaptiveAggregation )
type AnonymizationLevel ¶
type AnonymizationLevel int
const ( NoAnonymization AnonymizationLevel = iota BasicAnonymization KAnonymity LDiversity TCloseness DifferentialAnonymization )
type AttackRecord ¶
type CertificateStore ¶
type CertificateStore struct{}
type ComparisonOperator ¶
type ComparisonOperator int
const ( Equals ComparisonOperator = iota NotEquals GreaterThan LessThan GreaterEqual LessEqual Contains StartsWith EndsWith Matches )
type CompressionType ¶
type CompressionType int
const ( NoCompression CompressionType = iota GZIPCompression LZ4Compression ZSTDCompression BrotliCompression CustomCompression )
type ComputeCapacity ¶
type Condition ¶
type Condition struct {
ConditionID string
Type ConditionType
Operator ComparisonOperator
Value interface{}
Weight float64
}
type ConditionType ¶
type ConditionType int
const ( ModelCondition ConditionType = iota PayloadCondition ContextCondition TimingCondition EnvironmentalCondition TechnicalCondition )
type Connection ¶
type ConsensusEngine ¶
type ConsensusEngine struct {
ConsensusType ConsensusType
ValidatorNodes []*FederatedNode
ConsensusRules []*ConsensusRule
VotingMechanism VotingMechanism
QuorumThreshold float64
TimeoutDuration time.Duration
}
func NewConsensusEngine ¶
func NewConsensusEngine() *ConsensusEngine
func (*ConsensusEngine) ValidateUpdate ¶
func (ce *ConsensusEngine) ValidateUpdate(ctx context.Context, update *AggregatedUpdate, participants []*FederatedNode) (*ConsensusResult, error)
type ConsensusResult ¶
type ConsensusRule ¶
type ConsensusType ¶
type ConsensusType int
const ( ProofOfWork ConsensusType = iota ProofOfStake ProofOfAuthority ByzantineFaultTolerant PracticalByzantineFaultTolerant DelegatedProofOfStake FederatedByzantineAgreement TenderminConsensus )
type ConsentType ¶
type ConsentType int
const ( ModelTraining ConsentType = iota DataAggregation PatternSharing MetricsSharing ResearchUse CommercialUse )
type ContributionRecord ¶
type ConvergenceStatus ¶
type ConvergenceStatus int
const ( NotConverged ConvergenceStatus = iota Converging Converged Diverging Oscillating Stagnating )
type CoordinatorNode ¶
type CoordinatorNode struct {
NodeID string
}
func NewCoordinatorNode ¶
func NewCoordinatorNode() *CoordinatorNode
type CrossValidationResults ¶
type DataSharingLevel ¶
type DataSharingLevel int
const ( NoSharing DataSharingLevel = iota AggregatedOnly PrivatizedData AnonymizedData PseudonymizedData FullSharing )
type DecisionType ¶
type DecisionType int
const ( ModelAcceptance DecisionType = iota ParameterUpdate NodeValidation RuleModification PrivacyPolicy SecurityPolicy )
type DifferentialPrivacyEngine ¶
type DifferentialPrivacyEngine struct{}
func NewDifferentialPrivacyEngine ¶
func NewDifferentialPrivacyEngine() *DifferentialPrivacyEngine
func (*DifferentialPrivacyEngine) AddNoise ¶
func (dp *DifferentialPrivacyEngine) AddNoise(update *LocalUpdate, privacyBudget float64) (*LocalUpdate, error)
type DistributedKnowledgeGraph ¶
type DistributedKnowledgeGraph struct{}
func NewDistributedKnowledgeGraph ¶
func NewDistributedKnowledgeGraph() *DistributedKnowledgeGraph
type EncryptionType ¶
type EncryptionType int
const ( AESEncryption EncryptionType = iota RSAEncryption ECCEncryption ChaCha20Encryption TLSEncryption E2EEncryption )
type FailurePattern ¶
type FederatedAttackLearningEngine ¶
type FederatedAttackLearningEngine struct {
// contains filtered or unexported fields
}
FederatedAttackLearningEngine implements privacy-preserving distributed attack learning Enables collaborative knowledge sharing across multiple attack instances without revealing sensitive data
func NewFederatedAttackLearningEngine ¶
func NewFederatedAttackLearningEngine(logger common.AuditLogger) *FederatedAttackLearningEngine
NewFederatedAttackLearningEngine creates a new federated learning engine
func (*FederatedAttackLearningEngine) JoinFederatedNetwork ¶
func (e *FederatedAttackLearningEngine) JoinFederatedNetwork(ctx context.Context, nodeRequest *NodeJoinRequest) (*FederatedNode, error)
JoinFederatedNetwork allows a new node to join the federated learning network
func (*FederatedAttackLearningEngine) ProcessLocalUpdates ¶
func (e *FederatedAttackLearningEngine) ProcessLocalUpdates(ctx context.Context, roundID string) (*AggregatedUpdate, error)
ProcessLocalUpdates collects and processes local updates from participants
func (*FederatedAttackLearningEngine) StartFederatedLearningRound ¶
func (e *FederatedAttackLearningEngine) StartFederatedLearningRound(ctx context.Context, participants []*FederatedNode, globalModel *GlobalAttackModel) (*FederatedRound, error)
StartFederatedLearningRound initiates a new federated learning round
type FederatedLearningType ¶
type FederatedLearningType int
const ( HorizontalFederated FederatedLearningType = iota VerticalFederated FederatedTransferLearning PersonalizedFederated CrossSiloFederated CrossDeviceFederated HierarchicalFederated AsynchronousFederated SecureAggregation PrivacyPreservingFederated )
type FederatedMessage ¶
type FederatedNode ¶
type FederatedNode struct {
NodeID string
NodeType NodeType
PublicKey *rsa.PublicKey
PrivateKey *rsa.PrivateKey
LocalData *LocalAttackData
LocalModel *LocalAttackModel
ReputationScore float64
PrivacyPreferences *PrivacyPreferences
ComputeCapacity *ComputeCapacity
NetworkProfile *NetworkProfile
TrustLevel TrustLevel
LastSeen time.Time
ContributionHistory []ContributionRecord
}
type FederatedNodeManager ¶
type FederatedNodeManager struct{}
func NewFederatedNodeManager ¶
func NewFederatedNodeManager() *FederatedNodeManager
func (*FederatedNodeManager) RegisterNode ¶
func (nm *FederatedNodeManager) RegisterNode(ctx context.Context, node *FederatedNode) error
type FederatedRound ¶
type FederatedRound struct {
RoundID string
RoundNumber int
StartTime time.Time
EndTime time.Time
Participants []*FederatedNode
GlobalModel *GlobalAttackModel
LocalUpdates map[string]*LocalUpdate
AggregatedUpdate *AggregatedUpdate
PrivacyBudget float64
ConsensusResult *ConsensusResult
RoundMetrics *RoundMetrics
Status RoundStatus
}
type GlobalAttackModel ¶
type GlobalAttackModel struct {
ModelID string
GlobalWeights []float64
ModelStructure *ModelStructure
AggregationRound int
ParticipantCount int
GlobalMetrics *GlobalMetrics
ConvergenceStatus ConvergenceStatus
Version int
LastUpdated time.Time
QualityScore float64
}
type GlobalMetrics ¶
type HomomorphicCryptographyEngine ¶
type HomomorphicCryptographyEngine struct{}
func NewHomomorphicCryptographyEngine ¶
func NewHomomorphicCryptographyEngine() *HomomorphicCryptographyEngine
type LatencyMetrics ¶
type LocalAttackData ¶
type LocalAttackData struct {
DataID string
AttackHistory []*AttackRecord
SuccessPatterns []*SuccessPattern
FailurePatterns []*FailurePattern
TargetProfiles []*TargetProfile
Techniques []*TechniqueRecord
Vulnerabilities []*VulnerabilityRecord
DataSize int64
DataQuality float64
PrivacyLevel PrivacyLevel
LastUpdated time.Time
}
type LocalAttackModel ¶
type LocalAttackModel struct {
ModelID string
ModelType ModelType
ModelWeights []float64
ModelStructure *ModelStructure
TrainingHistory []*TrainingRecord
PerformanceMetrics *PerformanceMetrics
Hyperparameters map[string]interface{}
Version int
LastTrained time.Time
}
type LocalUpdate ¶
type MessageQueue ¶
type MessageQueue struct {
QueueType QueueType
Messages []*FederatedMessage
Capacity int
PriorityQueue bool
Persistence bool
}
type MessageType ¶
type MessageType int
const ( ModelUpdate MessageType = iota AggregationRequest ConsensusVote ValidationRequest HeartbeatMessage JoinRequest LeaveRequest ErrorReport )
type ModelAggregationEngine ¶
type ModelAggregationEngine struct{}
func NewModelAggregationEngine ¶
func NewModelAggregationEngine() *ModelAggregationEngine
func (*ModelAggregationEngine) AggregateUpdates ¶
func (ae *ModelAggregationEngine) AggregateUpdates(ctx context.Context, updates map[string]*LocalUpdate, globalModel *GlobalAttackModel) (*AggregatedUpdate, error)
type ModelStructure ¶
type ModelStructure struct {
Layers []*Layer
Connections []*Connection
Parameters int64
Complexity float64
}
type NetworkProfile ¶
type NetworkTopology ¶
type NetworkTopology struct{}
type NodeCredentials ¶
type NodeJoinRequest ¶
type NodeJoinRequest struct {
NodeType NodeType
PublicKey *rsa.PublicKey
PrivateKey *rsa.PrivateKey
LocalData *LocalAttackData
PrivacyPreferences *PrivacyPreferences
ComputeCapacity *ComputeCapacity
NetworkProfile *NetworkProfile
Credentials *NodeCredentials
}
type PatternType ¶
type PatternType int
const ( SequentialPattern PatternType = iota ConditionalPattern TemporalPattern ContextualPattern TechnicalPattern BehavioralPattern StatisticalPattern CausalPattern )
type PerformanceMetrics ¶
type PrivacyLevel ¶
type PrivacyLevel int
const ( PublicData PrivacyLevel = iota SensitiveData HighlyConfidentialData ClassifiedData TopSecretData )
type PrivacyMechanism ¶
type PrivacyMechanism int
const ( DifferentialPrivacy PrivacyMechanism = iota HomomorphicEncryption SecureMultipartyComputation TrustedExecutionEnvironment ZeroKnowledgeProofs LocalDifferentialPrivacy FunctionalEncryption SecretSharing GarbledCircuits PrivateSetIntersection )
type PrivacyNoise ¶
type PrivacyPreferences ¶
type PrivacyPreferences struct {
PrivacyBudget float64
NoiseLevel float64
DataSharing DataSharingLevel
AnonymizationLevel AnonymizationLevel
ConsentTypes []ConsentType
RetentionPeriod time.Duration
}
type PrivacyPreservationEngine ¶
type PrivacyPreservationEngine struct{}
func NewPrivacyPreservationEngine ¶
func NewPrivacyPreservationEngine() *PrivacyPreservationEngine
type QualityCheck ¶
type QualityCheckType ¶
type QualityCheckType int
const ( DataQualityCheck QualityCheckType = iota ModelQualityCheck PrivacyQualityCheck SecurityQualityCheck FairnessCheck RobustnessCheck )
type ReputationSystem ¶
type ReputationSystem struct{}
func NewReputationSystem ¶
func NewReputationSystem() *ReputationSystem
type RoundMetrics ¶
type RoundStatus ¶
type RoundStatus int
const ( RoundInitializing RoundStatus = iota RoundActive RoundAggregating RoundCompleted RoundFailed RoundCancelled )
type RoutingProtocol ¶
type RoutingProtocol int
const ( DirectRouting RoutingProtocol = iota BroadcastRouting MulticastRouting GossipProtocol DHRouting OnionRouting )
type SecureCommunicationLayer ¶
type SecureCommunicationLayer struct {
EncryptionType EncryptionType
CertificateStore *CertificateStore
MessageQueue *MessageQueue
NetworkTopology *NetworkTopology
RoutingProtocol RoutingProtocol
CompressionType CompressionType
}
func NewSecureCommunicationLayer ¶
func NewSecureCommunicationLayer() *SecureCommunicationLayer
func (*SecureCommunicationLayer) ReceiveUpdates ¶
func (cl *SecureCommunicationLayer) ReceiveUpdates(roundID string) []*LocalUpdate
func (*SecureCommunicationLayer) SendMessage ¶
func (cl *SecureCommunicationLayer) SendMessage(ctx context.Context, message *FederatedMessage) error
type StatisticalTest ¶
type StatisticalTestType ¶
type StatisticalTestType int
const ( TTest StatisticalTestType = iota ChiSquareTest KSTest MannWhitneyTest WilcoxonTest AndersonDarlingTest )
type SuccessPattern ¶
type TargetProfile ¶
type TechniqueRecord ¶
type TrainingRecord ¶
type TrainingRequest ¶
type TrustLevel ¶
type TrustLevel int
const ( UntrustedNode TrustLevel = iota BasicTrust VerifiedTrust HighTrust CriticalTrust )
type ValidationResults ¶
type ValidationResults struct {
ValidationID string
ValidationScore float64
TestAccuracy float64
CrossValidation *CrossValidationResults
StatisticalTests []StatisticalTest
QualityChecks []QualityCheck
Passed bool
}
type VotingMechanism ¶
type VotingMechanism int
const ( MajorityVoting VotingMechanism = iota WeightedVoting QuadraticVoting ApprovalVoting RankedChoiceVoting ConsensusVoting )
Click to show internal directories.
Click to hide internal directories.