Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Cross-lingual information retrieval

Cross-lingual information retrieval (CLIR) is the set of methods that let a user submit a query in one language and retrieve relevant documents in another language, using translation models, bilingual resources, or language-independent representations.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Engineers build search systems used across languages (for example, a Hindi-speaking user searching English web pages). Cross-lingual information retrieval (CLIR) makes such systems work: it reduces language barriers, improves access to information, and is used in web search, digital libraries, legal and medical retrieval, and multilingual question-answering systems.

Key ideas

Start with definitions (plain English, each term defined before use):

  • Query: the short text (words) a user types or speaks to ask for information. (Defined before use below.)
  • Document: a piece of text stored in the search system (a webpage, article, etc.).
  • Source language: the language of the query.
  • Target language: the language of the documents being searched.
  • Cross-lingual information retrieval (CLIR): retrieval where the query language and document language differ; a CLIR system returns relevant documents in the target language for a source-language query.
  • Bilingual lexicon / dictionary: a list of word translations (source word → target word) often with probabilities or scores.
  • Parallel corpus: a set of sentence pairs translated sentence-for-sentence between two languages (gold standard for learning translation probabilities).
  • Comparable corpus: collections in two languages about the same topics but not sentence-aligned; useful when parallel corpora are scarce.
  • Translation model: a probability model that gives p(target_word | source_word), i.e. the chance that a particular target word is a translation of a source word. Useful to convert queries to document language or vice versa.
  • Interlingua / language-independent representation: a representation that maps words or documents from different languages into a shared space (for example, multilingual word embeddings). An interlingua avoids explicit word-to-word translation by comparing in this shared space.
  • Pivot language: an intermediate language used when there is little direct parallel data between two languages (e.g., use English as pivot between Assamese and Tamil).
  • Transliteration: converting the spelling of words from one script to another (useful for named entities, brand names, and loanwords).

Architectures (draw these when asked; see diagram descriptions below):

  1. Query translation: translate the query from source to target language, then use a standard monolingual retrieval system (index in the target language). Simple but errors in translation reduce recall.
  2. Document translation: translate documents (or their indexes) from target to source language, then retrieve in source language. Expensive at indexing time but can give better ranking.
  3. Interlingua / multilingual representation: map queries and documents into the same vector space (for example, bilingual embeddings) and compute similarity directly. Avoids explicit text translation.
  4. Hybrid and pivot methods: combine the above, or use a pivot language or both bilingual lexicons and embeddings.

Retrieval models adapted for CLIR (short introductions):

  • Vector space approach: represent query and documents as weighted term vectors (tf-idf or embeddings) and use a similarity measure (e.g., cosine). See "Information retrieval with the vector space model" for tf-idf and cosine basics.
  • Translation-based probabilistic scoring: score p(query | document) by summing over possible translations of document words into query words (translation model inside the retrieval score). This is a principled probabilistic adaptation of the language-model approach to retrieval.
  • Language-model approach with smoothing: treat document as a language model p(w | d); compute p(q | d) and rank by that. For CLIR, replace p(q | d) by a translation-smoothed version using p(q | s) for source/target words.

Assumptions commonly used in derivations

  • Bag-of-words: query and documents are treated as unordered multisets of words (ignores syntax).
  • Term independence: different query terms are treated independent given a document when using product-of-probabilities scoring.
  • Availability of translation probabilities p(t_target | s_source) from a bilingual lexicon or trained model.

Diagram to draw (exam answers often ask for this):

  • Draw four boxes left-to-right labeled: "User Query (L1)" → "Query Processing: tokenise, transliterate, translate (L1→L2) / or map to interlingua" → "Retrieval: index (L2) + scoring (translation or embeddings)" → "Post-processing: translate snippets back to L1, rerank, present results". Label arrows: "translation model / bilingual lexicon", "index (inverted index)" and "scoring: cosine or p(q|d)". Under the query-processing box write: "use stemming/lemmatisation when available (refer to stemming and lemmatisation topic)."

Formulas

p(d | q) ∝ p(q | d) · p(d)

  • p(d | q): posterior probability document d is relevant to query q (score for ranking). No SI unit. Applies under Bayes' retrieval principle.

p(q | d) = ∏_{i=1}^{m} p(q_i | d)

  • q = (q_1,...,q_m) the query terms, assuming term independence. p(q_i | d) is the probability of query term q_i given document d.

p(q | d) = ∏_{i=1}^m ∑_{j=1}^{n} p(q_i | s_j) · p(s_j | d)

  • Translation-based score: s_j are target-language tokens (words) in document d; p(q_i | s_j) is translation probability; p(s_j | d) is probability of target token s_j in d (e.g., tf/|d| or a smoothed estimate). Applies when converting document words to query language.

score(d,q) = Σ_{i=1}^{m} log ( Σ_{j=1}^{n} p(q_i | s_j) · p(s_j | d) ) (log form for numerical stability and ranking)

  • Use this as a ranking score (no units).

cosine(vec_q, vec_d) = (vec_q · vec_d) / (||vec_q|| · ||vec_d||)

  • vec_q, vec_d: term-weight vectors (e.g., tf-idf). No units. Applies in vector-space CLIR or multilingual embedding spaces.

tf-idf_{t,d} = tf_{t,d} · idf_t, idf_t = log(N / df_t)

  • tf_{t,d}: term frequency of term t in document d; df_t: document frequency; N: number of documents. Log base can be e or 10; specify choice. No units. Used in vector-space weighting.

(Dirichlet smoothing for language model, used in p(s_j | d))

p(w | d) = (c(w,d) + μ · p(w | C)) / (|d| + μ)

  • c(w,d): count of word w in document d; |d|: total tokens in d; p(w | C): collection (background) probability; μ: smoothing parameter (typical μ ≈ 1000–2000; verify). No units.

(IBM Model 1: probability of target sentence e given source sentence f)

p(e | f) = (1 / (m+1)^l) · ∏_{i=1}^{l} Σ_{j=0}^{m} t(e_i | f_j)

  • f has length m (f_1..f_m), with f_0 = NULL; e has length l (e_1..e_l); t(e | f) are translation probabilities. Applies in word-alignment translation modeling (IBM Model 1).

(EM update for IBM Model 1: expected counts and normalization)

count(e | f) = Σ_{sentence pairs} Σ_{i=1}^{l} Σ_{j=0}^{m} 1[e_i = e] · 1[f_j = f] · ( t(e_i | f_j) / Σ_{k=0}^{m} t(e_i | f_k) )

t(e | f) = count(e | f) / Σ_{e'} count(e' | f)

  • These are the M-step normalisations. No SI units. Applies during training with the EM algorithm.

Worked examples

Model answer 1 — Compare architectures and give pros/cons (typical long-question answer):

  • Query translation: describe steps — (1) pre-process query (tokenise, transliterate named entities), (2) look up translations from bilingual lexicon or translation model, (3) expand query with multiple translations and weights, (4) retrieve from target-language index using a monolingual retrieval model (vector-space or language model). Advantages: fast at query time, low index cost. Disadvantages: short queries give sparse translation evidence, ambiguous translations hurt recall and precision.

  • Document translation: describe steps — translate document text or index into query language (offline), then perform monolingual retrieval. Advantages: richer context for translation reduces ambiguity, can translate rare words better. Disadvantages: expensive offline translation and possible index bloat; translation errors propagate.

  • Interlingua / multilingual embeddings: describe steps — map query and documents into same vector space (trained on parallel/comparable corpora or via mapping), compute cosine similarities directly. Advantages: no explicit translation, handles distributional meaning well, efficient scoring. Disadvantages: embedding quality depends on training data; OOV and morphology problems remain (combine with transliteration or subword models).

Conclude: choose architecture by resource availability (bilingual dictionary, parallel corpus), latency requirements, and target languages. Mention pivot methods and hybrid ensembles to balance precision and recall.

Model answer 2 — Derivation of translation-based language-model scoring (typical derivation exam question):

  1. Start with Bayes ranking: rank by p(d | q) ∝ p(q | d) · p(d). For retrieval we often ignore p(d) or set it uniform.
  2. For a bag-of-words query q = (q_1..q_m) assume independence: p(q | d) = ∏_{i=1}^m p(q_i | d).
  3. In CLIR we cannot observe q_i in the document language directly. Let s be target-language words in document d. Use the law of total probability to expand p(q_i | d): p(q_i | d) = Σ_{s} p(q_i | s) · p(s | d) where p(q_i | s) are translation probabilities and p(s | d) is the estimate of target-word probability in d (use smoothed tf counts).
  4. Combine to obtain p(q | d) = ∏_i Σ_s p(q_i | s) p(s | d) and take log for scoring: score(d,q) = Σ_i log Σ_s p(q_i | s) p(s | d).
  5. Explain smoothing for p(s | d) using Dirichlet smoothing (formula given earlier) to avoid zero probabilities and to integrate collection frequency.
  6. Conclude with practical steps: precompute p(s | d) for terms in index; estimate p(q_i | s) from bilingual lexicon or IBM Model 1 trained on parallel data; use log-sum-exp for numeric stability.

(If asked for a diagram, draw the boxes: query, translation probabilities, p(s|d) table, score computation and ranking.)

Common mistakes

  • Using raw counts instead of probabilities when plugging into probabilistic formulas.
  • Mixing up source and target in translation probability indexing (careful with t(e|f) vs t(f|e)).
  • Over-relying on dictionary lookups for named entities (need transliteration).
  • Ignoring domain mismatch: translation probabilities trained on one domain (news) may fail on another (medical).

For your exam

Kinds of questions you will see: short definitions (define CLIR, parallel corpus, pivot language), short notes (list architectures, trade-offs), derivations (derive p(q | d) for a translation model), numeric/algorithmic (EM update for IBM Model 1), diagram questions (draw CLIR pipeline), and applied/oral-style questions (describe steps to build a CLIR system for a low-resource Indian language). Also know standard IR evaluation metrics (MAP, nDCG, Precision@k, Recall@k, MRR) and common CLIR benchmarks (TREC and CLEF CLIR tracks; FIRE for Indian languages).

What full-marks answers include:

  • Clear definitions of terms used.
  • A diagram when asked, with boxes and labelled arrows as described earlier.
  • Explicit assumptions (bag-of-words, term independence) before derivations.
  • Step-by-step derivation, showing how to move from Bayes to the translation sum and to the log score.
  • Mention smoothing and practical issues (transliteration, named entities, domain mismatch).

Quick check

  1. What is the main difference between "query translation" and "interlingua" approaches to CLIR?
  2. Write the formula that replaces p(q | d) by a sum over document words using translation probabilities.
  3. In IBM Model 1 EM training, what is the M-step update for t(e | f)?

Answers: 1) Query translation explicitly translates the query into the document language; interlingua maps both query and documents into a shared representation without explicit translation. 2) p(q | d) = ∏{i=1}^{m} Σ{j=1}^{n} p(q_i | s_j) · p(s_j | d). 3) t(e | f) = count(e | f) / Σ_{e'} count(e' | f), where count(e | f) are expected counts computed in the E-step.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?