U.S. flag
      An official website of the United States government, Department of Justice.
        Here's how you know
      Here's how you know**Official websites use .gov**
            
            A **.gov** website belongs to an official government organization in the United States.
      **Secure .gov websites use HTTPS**
            
            A **lock** (
            A locked padlock
            ) or **https://** means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites. Menu

      
        close

            
            
                                              About NIJ
        
                    
  
          About NIJ
      
    
          The NIJ Director
          How NIJ Is Organized
          Mission and Guiding Principles
          Research and Development Process
          Strategic Framework
          Assessments of NIJ
          Annual Reports & Reports to Congress
          Staff Directory
          Funding & Awards
        
                    
  
          Funding & Awards
      
    
          Current Funding
          Forthcoming Funding
          Expired Funding
          Awards: Listing of Funded Projects
          Guidance for Applicants and Awardees
          Fellowship & Student Programs
          Travel Scholarships
          NIJ Challenge Program
          Library & Multimedia
        
                    
  
          Library & Multimedia
      
    
          NIJ Journal
          Podcasts
          Publications Listing
          Multimedia Listing
          Rated Practices on CrimeSolutions
          Rated Programs on CrimeSolutions
          Software & Databases
          Datasets
          Patents
          Topics
        
                    
  
          Topics
      
    
          Article Listing
          Corrections
          Courts
          Crime Prevention
          Crimes
          Drugs and Crime
          Equipment and Technology
          Forensic Sciences
          Youth Justice
          Justice System Reform
          Law Enforcement
          Tribal Crime and Justice
          Victims of Crime
          Events
        
                    
  
          Events
      
    
          NIJ 2024 Research Conference
          Scheduled Events
          On-Demand Events
          Research Meetings & Workshops
          NIJ-Hosted Online Training

                            
                                About
          Contact Us
          Subscribe
          Topics A-Z
                  Share
FacebookXLinkedInRedditPinterestEmail Home
                            Library & Multimedia
 Rep2Vec: Repository Embedding via Heterogeneous Graph Adversarial Contrastive Learning
NCJ Number
              307527

Author(s)
          Yiyue Qian;
                        Yiming Zhang;
                        Qianlong Wen;
                        Yanfang Ye;
                        Chuxu Zhang
Date Published

August 2022
Length
              11 pages
Annotation
              The study demonstrates the effectiveness of Rep2Vec in comparison with state-of-the-art methods for multiple repository tasks.
Abstract
              The authors of this study conducted extensive experiments on the collected dataset from GitHub demonstrating the effectiveness of Rep2Vec in comparison with state-of-the-art methods for multiple repository tasks. Driven by the exponential increase of software and the advent of the pull-based development system Git, a large amount of open-source software has emerged on various social coding platforms. GitHub, as the largest platform, not only attracts developers and researchers to contribute legitimate software and research-related source code but has also become a popular platform for an increasing number of cybercriminals to perform continuous cyberattacks. Hence, some tools have been developed to learn representations of repositories on GitHub for various related applications (e.g., malicious repository detection) recently. However, most of them merely focus on code content while ignoring the rich relational data among repositories. In addition, they usually require a mass of resources to obtain sufficient labeled data for model training while ignoring the usefully handy unlabeled data. The authors propose a novel model Rep2Vec which integrates the code content, the structural relations, and the unlabeled data to learn the repository representations. First, to comprehensively model the repository data, we build a repository heterogeneous graph (Rep-HG) which is encoded by a graph neural network. Afterwards, to fully exploit unlabeled data in Rep-HG, the authors introduce adversarial attacks to generate more challenging contrastive pairs for the contrastive learning module to train the encoder in node view and meta-path view simultaneously. To alleviate the workload of the encoder against attacks, the authors further design a dual-stream contrastive learning module that integrates contrastive learning on adversarial graph and original graph together. Finally, the pre-trained encoder is fine-tuned to the downstream task, and further enhanced by a knowledge distillation module. (Published Abstract Provided)
      
  
          Additional Details
Grant Number(s)
        2018-75-CX-0032


  
  
        
  Agencies
        NIJ-Sponsored


  
  
        
  Award
        Using Artificial Intelligence Technologies to Expose Darknet Opioid Traffickers
    
  
  
Date Published: August 1, 2022
    
          Downloads
        
                      HTML

Side navigation
  

        

  
  
              NIJ Journal
    
      
            
            
            
      Podcasts
    
      
            
            
            
      Publications Listing
    
      
            
            
            
      Multimedia Listing
    
      
            
            
            
      Rated Practices on CrimeSolutions
    
      
            
            
            
      Rated Programs on CrimeSolutions
    
      
            
            
            
      Software & Databases
    
      
            
            
            
      Datasets
    
      
            
            
            
      PatentsRelated Topics
        
                Equipment and technology
        Opioids
        Cyber crime
        Drugs
        Drug markets



  
Similar Publications
        
                      Direct-Injection Mass Spectrometric Method for the Rapid Identification of Fentanyl and Norfentanyl in Postmortem Urine of Six Drug-Overdose Cases
                  Methodology for Detecting Residual Phosphoric Acid in Polybenzoxazole Fibers
                  Author Correction: The Effect of Electronic Cigarette User Modifications and E-liquid Adulteration on the Particle Size Profile of an Aerosolized Product
 Top

      National Institute of Justice

        
        
                        About NIJ
                    About NIJ
      
    
                  How NIJ Is Organized
      
    
                  NIJ Director
      
    
                  Research Disclaimer
      
    
                  Funding & Awards
                    Funding & Awards Home
      
    
                  Awards Listing
      
    
                  Current Funding
      
    
                  Guidance for Applicants and Awardees
      
    
                  Resources
                    Events
      
    
                  Podcasts
      
    
                  Publications
      
    
                  Topics
      
    
                  Multimedia
      
    
                  Reuse Policy
      
    
                  Contacts
                    Contact NIJ
      
    
                  Staff Directory
      
    
                  Submit a FOIA Request
      
    
                  File a Civil Rights ComplaintFacebook
          
                      X
          
                      YouTube
  

      810 7th St. NW, Washington, D.C. 20531
      
              Secondary Footer link menu
            Accessibility
              Plain Language
              Privacy Policy
              Legal Policies and Disclaimer
              No FEAR Act
              Freedom of Information Act
              USA.gov
              Justice.gov