NLP - Acadamic Learning Topics

 Natural Learning Processing

Videos Playlist

Part-1

➡️NLP phases:  Link🔗 

Lexical analysis, Syntactic analysis, Semantic analysis, Discourse Integration, Pragmatic Analysis.

➡️Noisy channel model: Wikipedia🔗 : Framework used in spell checkers


➡️Concepts of Parts of Speech and Formal Grammar of Natural Grammar of English: Web Link

Part-2

➡️N-gram model: PPTYT video

➡️Language Models: YT video

➡️Neural Networks: PPT

Part-3

➡️POS tagging: YT Video (rule based, Transformation based, Probablistic based)

➡️Hidden Markov Model: YT video (N-gram: 2 Steps)


Part - 4 

➡️Parsing in NLP: PPT 

➡️Tree Bank: PPT

➡️CKY parsing: YT Video (Also probablistic CKY)


Part - 5 

➡️Vector Semantics: Web

➡️CBOW: GFG

➡️Skip-gram: Web

➡️Wordsense and WordNet: ChatGPT













Best Resources to learn Generative Ai

 

GENERATIVE AI RESOURCES

  1. Generative AI learning path by Google Cloud. A series of 10 courses on generative AI products and technologies, from the fundamentals of Large Language Models to how to create and deploy generative AI solutions on Google Cloud [Link].
  2. Generative AI short courses by DeepLearning.AI - Five short courses on generative AI including LangChain for LLM Application Development, How Diffusion Models Work and more. [Link].
  3. LLM Bootcamp: A series of free lectures by The full Stack on building and deploying LLM apps [Link].
  4. Building AI Products with OpenAI - a free course by CoRise in collaboration with OpenAI [Link].
  5. Free Course by Activeloop on LangChain & Vector Databases in Production [Link].
  6. Pinecone learning center - Lots of free guides as well as complete handbooks on LangChain, vector embeddings etc. by Pinecone [Link].
  7. Build AI Apps with ChatGPT, Dall-E and GPT-4  - a free course on Scrimba [Link].
  8. Gartner Experts Answer the Top Generative AI Questions for Your Enterprise - a report by Gartner [Link]
  9. GPT best practices: A guide by OpenAI that shares strategies and tactics for getting better results from GPTs [Link].
  10. OpenAI cookbook by OpenAI - Examples and guides for using the OpenAI API [Link].
  11. Prompt injection explained, with video, slides, and a transcript from a webinar organized by LangChain [Link].
  12. A detailed guide to Prompt Engineering by DAIR.AI [Link]
  13. What Are Transformer Models and How Do They Work. A tutorial by Cohere AI [Link]
  14. Learn Prompting: an open source course on prompt engineering[Link]

RSA Algorithm

 RSA Algorithm

RSA (Rivest–Shamir–Adleman) is a widely used public-key cryptosystem, meaning it utilizes a pair of mathematically linked keys for encryption and decryption. Here's a deeper look into RSA:

Core Concept:

  • RSA leverages the mathematical difficulty of factoring large prime numbers.
  • It's computationally easy to multiply large prime numbers together, but extremely hard to reverse the process and find the original primes.

Key Generation:

  1. Prime Numbers: Two large, distinct prime numbers (p and q) are chosen as the foundation.
  2. Modulus (n): The product of p and q (n = p * q) becomes the public key's modulus.
  3. Euler's Totient (φ(n)): A mathematical function (Euler's totient) is applied to n, resulting in φ(n).
  4. Public Exponent (e): A public exponent (e) is chosen such that 1 < e < φ(n) and has no common factors with φ(n).
  5. Private Exponent (d): Using a mathematical equation (modular multiplicative inverse), a private exponent (d) is derived that satisfies the equation (e * d) ≡ 1 (mod φ(n)).

Key Distribution:

  • The public key (e, n) is freely distributed. Anyone can encrypt messages using this key.
  • The private key (d, n) is kept confidential. It's used for decryption.

Encryption Process:

  1. Plaintext Conversion: The message (plaintext) is converted into numerical blocks smaller than the modulus (n).
  2. Encryption: Each plaintext block (M) is raised to the power of the public exponent (e) and then modulo n. This creates the ciphertext block (C) using the formula: C = M^e (mod n).

Decryption Process:

  1. Ciphertext Received: The receiver gets the ciphertext block (C).
  2. Decryption: The private exponent (d) is used to decrypt the message. The original block (M) is recovered using the formula: M = C^d (mod n).

Security and Applications:

  • The security of RSA relies on the difficulty of factoring large n. As key sizes increase, so does the difficulty of breaking the encryption.
  • RSA is commonly used for:
    • Secure communication (HTTPS, digital signatures)
    • Secure key exchange for other encryption algorithms
    • Digital signing of documents to ensure authenticity

Limitations:

  • RSA is computationally slower than symmetric algorithms like AES.
  • It's not ideal for encrypting large amounts of data directly. It's often used to encrypt smaller chunks like keys for symmetric encryption.

Overall, RSA remains a cornerstone of public-key cryptography, providing secure communication and digital signatures for various applications.

Columnar Transposition

 Columnar Transposition

The columnar transposition cipher is a classic technique for encryption that relies on rearranging the letters of the message, not substituting them. Here's a breakdown of the algorithm:

Encryption Process:

  1. Key Selection: Choose a keyword. The length of the keyword determines the number of columns used in the encryption process.
  2. Message Preparation: Write the plaintext message out in rows, with the number of rows determined by the length of the longest word (including spaces or punctuation) if needed. You can add padding characters (e.g., "X") to fill in any incomplete rows.
  3. Column Labeling: Write the chosen keyword letters at the top of each column, following the alphabetical order of the letters in the keyword (repeating if necessary).
  4. Columnar Transposition: Read the message down each column and write the letters out in a new sequence, following the order defined by the keyword at the top.

Example:

  • Plaintext: "Meet me at the park tomorrow night"
  • Keyword: "LOVE" (alphabetical order: "ELOV")

Steps:

  1. Plaintext (9 characters, needs padding with "X"): "Meet me a_X_X_X_X night" (6 rows)
  2. Columns labeled with "ELOV" (repeated)
  3. Transposed message: "MXaete_ nXhight Xlroooa_"

Decryption Process:

  1. Keyword and Columns: Use the same keyword to define the column order.
  2. Message Segmentation: Write the ciphertext into a grid matching the number of columns (based on the keyword).
  3. Columnar Reading: Read each column from top to bottom, and concatenate the resulting rows to get the original message.

In the above example:

  1. Keyword: "LOVE" (repeated)
  2. Ciphertext grid:
    M X a e t e _ 
    n X h i g h t 
    X l r o o o a _
    
  3. Decrypted message: "Meet me at_the park tomorrow night" (remove padding)

Security and Applications:

  • The security of the columnar transposition cipher relies on the secrecy of the keyword. A longer and more complex keyword makes it harder to crack the code.
  • However, with techniques like frequency analysis and knowledge of the language, the cipher can be vulnerable, especially for short keywords.
  • Historically, columnar transpositions were used for simple military communication.
  • In modern cryptography, it's considered a weak encryption method due to its limitations.

Additional Notes:

  • There are variations of the columnar transposition cipher, such as double columnar transposition where the message is encrypted twice using different keywords for added complexity.
  • While not a secure standalone method, the concept of columnar transposition can be combined with other encryption techniques for more robust security.

AES Alogorithm

 AES Alogorithm

The Advanced Encryption Standard (AES) is a widely used and incredibly secure symmetric block cipher that addresses the limitations of its predecessor, DES. Here's a breakdown of key aspects of AES:

What is AES?

  • Established in 2001 by NIST (National Institute of Standards and Technology), AES is a symmetric-key algorithm, meaning the same key is used for encryption and decryption.
  • It operates on fixed-size data blocks (128 bits) and supports variable key lengths (128, 192, or 256 bits), providing a significant security improvement over DES.

Technical Details:

  • Unlike DES, AES relies on a substitution-permutation network (SP network) for encryption.
  • This involves intricate substitutions and permutations of data bytes during multiple rounds (10, 12, or 14 depending on key length).
  • AES operates on a 4x4 matrix of bytes, performing substitutions on individual bytes and shuffling them using row and column operations.
  • The key schedule generates round keys from the main key, ensuring diffusion and confusion throughout the encryption process.

Security and Strength:

  • AES is considered exceptionally secure due to its robust design, large key sizes, and resistance to known attacks.
  • Brute-force attacks (trying all key combinations) are computationally infeasible with current technology.
  • AES is the de facto standard for symmetric encryption and is widely used in various applications like:
    • Secure communication (HTTPS, VPNs)
    • Data protection (disk encryption, file encryption)
    • Payment processing

Advantages over DES:

  • Stronger key lengths make AES significantly more resistant to brute-force attacks compared to DES.
  • Faster and more efficient encryption/decryption due to its optimized design.
  • More secure against various cryptanalysis techniques.

Overall, AES is a powerful and secure encryption algorithm that remains the industry standard for protecting sensitive data.

Popular Post

MindMaps

Featured post

Question 1: Reverse Words in a String III

  def reverseWords(s: str) -> str: words = s.split() return ' '.join(word[::-1] for word in words)