# Patent

## Title
Language model with structured penalty

## Abstract

A penalized loss is optimized using a corpus of language samples respective to a set of parameters of a language model. The penalized loss includes a function measuring predictive accuracy of the language model respective to the corpus of language samples and a penalty comprising a tree-structured norm. The trained language model with optimized values for the parameters generated by the optimizing is applied to predict a symbol following sequence of symbols of the language modeled by the language model. In some embodiments the penalty comprises a tree-structured lp-norm, such as a tree-structured l2-norm or a tree-structured l∞-norm. In some embodiments a tree-structured l∞-norm operates on a collapsed suffix trie in which any series of suffixes of increasing lengths which are always observed in the same context are collapsed into a single node. The optimizing may be performed using a proximal step algorithm.

## Background
BACKGROUND
The following relates to the language modeling arts, language processing arts, and related arts.
Language models are employed in natural language processing pipelines for applications such as speech recognition, machine translation, information retrieval, and so forth. Given an observed sequence of symbols, a language model predicts the probability of occurrence of the next symbol in the sequence. By way of illustration, in a language model for a written natural language, the symbols are typically words (e.g. in languages such as English or French) or characters or glyphs (e.g. in languages such as Chinese). In modeling of spoken language audio, the symbols are suitably audio segments corresponding to spoken words of the natural language.
Language models based on back-off smoothing have been developed which have demonstrated good predictive power, such as Kneser-Ney (KN) language models and variants thereof. Smoothing-based language models are heuristically based, and typically have numerous tuning parameters that are adjust in an ad-hoc fashion. Other approaches for learning language models have been proposed based on maximum entropy, conditional random field, or Bayesian approaches.
BRIEF DESCRIPTION
In some illustrative embodiments disclosed as illustrative examples herein, a non-transitory storage medium stores instructions readable and executable by an electronic data processing device to perform a method including the operations of: optimizing a penalized loss argminW ƒ(W)+λΩ(W) using a corpus of language samples respective to a set of parameters W={wv}vεV of a language model, where V is a vocabulary, ƒ(W) is a function measuring predictive accuracy of the language model respective to the corpus of language samples, Ω(W) is a penalty comprising a tree-structured norm, and λ is a regularization parameter; and outputting a trained language model with optimized values for the parameters W generated by the optimizing. In some embodiments the penalty Ω(W) comprises lpT(w)=∥g(w,j)∥p where ∥•∥p denotes the lp-norm, g(w,j) is the sub-vector of w associated with the subtree rooted at node j of the suffix trie T of a language sample of the corpus, and g is an ordered set of nodes of the suffix trie. The penalty Ω(W) may comprise l2T(w)=∥g(w,j)∥2 where ∥•∥2 denotes the l2-norm. The penalty Ω(W) comprises l∞T(w)=∥g(w,j)∥∞ where ∥•∥∞ denotes the l∞-norm, and optionally the suffix trie comprises a collapsed suffix trie in which any series of suffixes of increasing lengths which are always observed in the same context are collapsed into a single node. In some embodiments the optimizing is performed using a proximal step algorithm.
In some illustrative embodiments disclosed as illustrative examples herein, an apparatus comprises a non-transitory storage medium as set forth in the immediately preceding paragraph and an electronic data processing device operatively connected to read and execute the instructions stored on the non-transitory storage medium.
In some illustrative embodiments disclosed as illustrative examples herein, a method comprises: optimizing a penalized loss using a corpus of language samples respective to a set of parameters of a language model wherein the penalized loss includes a function measuring predictive accuracy of the language model respective to the corpus of language samples and a penalty comprising a tree-structured norm; and applying the trained language model with optimized values for the parameters generated by the optimizing to predict a symbol following sequence of symbols of the language modeled by the language model. The optimization and the applying are suitably performed by an electronic data processing device. In some embodiments the penalty comprises a tree-structured lp-norm, such as a tree-structured l2-norm or a tree-structured l∞-norm. In some embodiments a tree-structured l∞-norm operates on a collapsed suffix trie in which any series of suffixes of increasing lengths which are always observed in the same context are collapsed into a single node. The optimizing may be performed using a proximal step algorithm.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 diagrammatically shows a language model learning system.
FIGS. 2, 3, 4, and 5 diagrammatically show an illustrative trie structured vector (FIG. 2) and corresponding collapsed tree structured vector (FIG. 3), and the corresponding vector after proximal projection for the l2T-norm (FIG. 4) and for the l∞T-norm (FIG. 5).
FIGS. 6 and 7 illustrate an embodiment of calculation of suffix trees (FIG. 6) and corresponding word-specific suffix tries.
FIGS. 8-12 present experimental results as described herein.



DETAILED DESCRIPTION
Disclosed herein are language models learned using penalized maximum likelihood estimation in log-linear models. A convex objective function is optimized using approaches for which polynomial-time algorithms are derived. In contrast to language models based on unstructured norms such as l2 (quadratic penalties) or l1 (absolute discounting), the disclosed approaches employ tree-structured norms that mimic the nested nature of word contexts and provide an efficient framework for the disclosed language models. In some embodiments, structured l∞ tree norms are employed with a complexity nearly linear in the number of nodes. This leads to an memory-efficient and time-efficient learning algorithm for generalized linear language models. In a further aspect, the optimization is performed using a proximal algorithm that is adapted to be able to scale with the large dimensionality of the feature space commonly employed in language model training (e.g., vocabularies of order thousands to tens of thousands of words, and context sample sizes on the order of 105 or larger for some typical natural language model learning tasks).
With reference to FIG. 1, the illustrative embodiments employ log-linear language models. Multinomial logistic regression and Poisson regression are examples of log-linear models. The likelihood in this class of models belongs to an exponential family, the predictor being linear. Without loss of generality, the following notation is employed. Let V be a set of words (or, more generally, symbols) called the vocabulary. Further, let xy be a sequence of n+1 symbols of V, where xεVn and yεV. A log-linear language model 10 computes the probability that symbol y succeeds x according to:




  
    
      
        
          P
          ⁡
          
            (
            
              y
              =
              
                v
                ❘
                x
              
            
            )
          
        
        =
        
          
            e
            
              
                w
                v
                T
              
              ⁢
              
                
                  φ
                  m
                
                ⁡
                
                  (
                  x
                  )
                
              
            
          
          
            
              ∑
              
                u
                ∈
                V
              
            
            ⁢
            
              e
              
                
                  w
                  u
                  T
                
                ⁢
                
                  
                    φ
                    m
                  
                  ⁡
                  
                    (
                    x
                    )
                  
                
              
            
          
        
      
    
    
      
        (
        1
        )
      
    
  




where the superscript “T” denotes transpose, W={wv}vεV is the set of parameters (where again V is the vocabulary and vεV is an element, i.e. word or symbol, of the vocabulary), and φm(x) is the vector of features extracted from x (the sequence preceding y).

Let denote the subsequence of x starting at the first position up to the ith position and yi the next symbol in the sequence. Parameters are estimated by minimizing the penalized log-loss 12:




  
    
      
        
          W
          *
        
        ∈
        
          
            
              
                arg
                ⁢
                
                  
                
                ⁢
                min
              
              
                W
                ∈
                K
              
            
            ⁢
            
              f
              ⁡
              
                (
                W
                )
              
            
          
          +
          
            λΩ
            ⁡
            
              (
              W
              )
            
          
        
      
    
    
      
        (
        2
        )
      
    
  




where ƒ(W):=−Σi=1n In p(yi|x1:i; W) and p(yi|x1:i; W) denotes the probability of word yi following suffix x1:i predicted by the language model with parameters W and  is a convex set representing the constraints applied on the parameters. (While a log-loss function is used in the illustrative embodiments, other loss functions can be employed as the function ƒ(W)). Overfitting is avoided by adjusting the regularization parameter λ, for example by cross-validation. The penalized log-loss objective 12 includes a penalty term Ω(W) 14, which in some illustrative embodiments is a tree-structured lp norm. For notational convenience, a tree-structured lp norm is also denoted herein by the notation lpT where the superscript “T” denotes “tree-structured”.

The feature vector φm(x) encodes suffixes (or contexts) of increasing length up to a maximum length m. Hence, the model defined in Equation (1) is similar to m-gram language models. In the illustrative embodiments, the feature vectors are encoded using suffix trees.
Suffix trees provide an efficient way to store and manipulate discrete sequences and can be constructed in linear time when the vocabulary is fixed. The suffix tree data structure encodes all the unique suffixes observed in sequences up to a maximum given length (denoted herein as m) in a corpus 20. (It is also contemplated to employ unbounded embodiments, i.e. m=∞, for which lpT-norms can still be computed). It exploits the fact that the set of observed contexts in the corpus 20 is a small subset of all possible contexts. When a series of suffixes of increasing lengths are always observed in the same context, the successive suffixes can be collapsed into a single node. The uncollapsed version of the suffix tree T is called a suffix trie, which is denoted herein as S. A suffix trie also has a tree structure, but it potentially has much larger number of nodes.
With brief reference to FIGS. 2 and 3, an example of a suffix trie S is given in FIG. 2, and the associated suffix tree T is shown in FIG. 3. The notation |S| is used herein to denote the number of nodes in the trie S and the notation |T| is used herein to denote the number of nodes in the tree T. Suffix tree encoding is advantageous in applications in which the resulting hierarchical structures are thin and tall with numerous non-branching paths. In the case of text, the number of nodes in the tree grows slower than that of the trie with the length of the sequence, due to the reduction in nodes afforded by node collapsing. This provides substantial gains in memory requirements and computational speed when this structure is exploited.
The feature vector φm(x) corresponds to one path of length m starting at the root of the suffix trie S. The entries in W correspond to weights for each suffix. This provides a trie structure S on W (see FIG. 2) constraining the number of free parameters. In other words, there is one weight parameter per node in the trie S and the matrix of parameters W is of size |S|.
Also disclosed herein are language models in which the number of parameters is equal to the size of the suffix tree T, which has significantly fewer nodes than the trie S. This is achieved by ensuring that all parameters corresponding to suffixes at a node share the same parameter value (see FIG. 3). These parameters correspond to paths in the suffix trie S (e.g. FIG. 2) that do not branch i.e. sequence of words that always appear together in the same order in the corpus 20. When considering tree-structured penalties, W is initialized to bear this property and the parameter optimization is performed so as to ensure that after each iteration of the minimization of the penalized loss of Equation (2) this property still holds.
With continuing reference to FIG. 1, in one illustrative embodiment the log-loss objective function 12 includes a smooth convex loss ƒ and a possibly non-smooth penalty depending on the choice of the penalization Ω. To minimize the log-loss objective 12, gradient descent can be employed for smooth penalties, with a switch to subgradient methods for non-smooth penalties. However, subgradient methods can be very slow to converge. In illustrative embodiments disclosed herein, proximal methods are employed for the minimization, as they exhibit good convergence rate as compared with other first-order techniques. Proximal methods also provide the ability to reuse specialized algorithms for different penalties by changing the proximal step.
Proximal methods iteratively update the current estimate by making a generalized gradient update at each iteration. Formally, they are based on a linearization of the objective function ƒ about the parameter estimate W, adding a quadratic penalty term to keep the updated estimate in the neighborhood of the current estimate. At iteration t, the update of the parameter W is given by:




  
    
      
        
          W
          
            t
            +
            1
          
        
        =
        
          
            
              arg
              ⁢
              
                
              
              ⁢
              min
            
            
              W
              ∈
              K
            
          
          ⁢
          
            {
            
              
                f
                ⁡
                
                  (
                  
                    W
                    _
                  
                  )
                
              
              +
              
                
                  
                    (
                    
                      W
                      -
                      
                        W
                        _
                      
                    
                    )
                  
                  T
                
                ⁢
                
                  ∇
                  
                    f
                    ⁡
                    
                      (
                      
                        W
                        _
                      
                      )
                    
                  
                
              
              +
              
                λΩ
                ⁡
                
                  (
                  W
                  )
                
              
              +
              
                
                  L
                  2
                
                ⁢
                
                  
                    
                    
                      W
                      -
                      
                        W
                        _
                      
                    
                    
                  
                  2
                  2
                
              
            
            }
          
        
      
    
    
      
        (
        3
        )
      
    
  




where ∥ . . . ∥22 denotes l2-norm the raised to the power 2 and L>0 is an upper bound on the Lipschitz constant of the gradient ∇ƒ(W). The matrix W can be the current estimate Wt or its weighted combination with the previous estimate Wt-1 for accelerated convergence. Equation (3) can be rewritten to be solved in two independent steps: a gradient update from the smooth part:





  
    
      
        
          W
          ′
        
        =
        
          
            W
            _
          
          -
          
            
              1
              L
            
            ⁢
            
              ∇
              
                f
                ⁡
                
                  (
                  
                    W
                    _
                  
                  )
                
              
            
          
        
      
    
    
      
        (
        4
        )
      
    
  




followed by a projection depending only on the non-smooth penalty





  
    
      
        
          W
          
            t
            +
            1
          
        
        =
        
          
            
              
                arg
                ⁢
                
                  
                
                ⁢
                min
              
              
                W
                ∈
                K
              
            
            ⁢
            
              1
              2
            
            ⁢
            
              
                
                
                  W
                  -
                  
                    W
                    ′
                  
                
                
              
              2
              2
            
          
          +
          
            
              λΩ
              ⁡
              
                (
                W
                )
              
            
            L
          
        
      
    
    
      
        (
        5
        )
      
    
  




The update of Equation (5) is called the proximal operator of W′ with parameter




  λ
  L




that is denoted herein as





  
    ∏
    Ω
  
  ⁢
  
    
      (
      
        
          W
          ′
        
        ,
        
          λ
          L
        
      
      )
    
    .
  




Efficiently computing the proximal step facilitates maintaining the fast convergence rates of proximal methods.

In language modelling applications, the number of training samples n in the corpus 20 is typically large, e.g. typically in the range of 105 or larger. To accommodate learning the language model 10 on such large corpus 20, an accelerated stochastic version of the proximal methods is employed. See Hu et al., “Accelerated gradient methods for stochastic optimization and online learning”, Advances in Neural Information Processing Systems (2009). At every update, the stochastic algorithm estimates the gradient on a mini-batch, that is, a subset of the samples. The size of the mini-batches controls the trade-off between the variance in the estimate of gradient and the time required for compute it. In experiments reported herein, mini-batches of size 400 were used. The training algorithm is summarized in Algorithm 1. The acceleration is obtained by making the gradient update at a specific weighted combination of the current and the previous estimates of the parameters. The weighting is shown in step 6 of the Algorithm 1.










Algorithm 1 W* := argmin {f(X, Y; W) +


λΩ(W)} Stochastic optimization algorithm


(Hu et al., 2009)

















 
1
Input: λ regularization parameter, L Lipschitz constant of




∇f, μ coefficient of strong-convexity of f + λΩ, X design




matrix, Y label set



2
Initialize: W = Z = 0, τ = δ = 1, ρ = L + μ



3
repeat until maximum iterations



4
 #estimate point for gradient update




 W = (1 − τ)W + τZ


 



5
 



  
    
      
        
          #
          ⁢
          use
          ⁢
          
            
          
          ⁢
          mini
          ⁢
          
            -
          
          ⁢
          batch
          ⁢
          
            
          
          ⁢
          
            {
            
              
                X
                θ
              
              ,
              
                Y
                θ
              
            
            }
          
          ⁢
          
            
          
          ⁢
          for
          ⁢
          
            
          
          ⁢
          update
        
      
    
    
      
        
          W
          =
          
            ParamUpdate
            ⁢
            
              
            
            ⁢
            
              (
              
                
                  X
                  θ
                
                ,
                
                  Y
                  θ
                
                ,
                
                  W
                  _
                
                ,
                λ
                ,
                ρ
              
              )
            
          
        
      
    
  
   






 



6
 



  
    
      
        
          #
          ⁢
          weighted
          ⁢
          
            
          
          ⁢
          combination
          ⁢
          
            
          
          ⁢
          of
          ⁢
          
            
          
          ⁢
          estimates
        
      
    
    
      
        
          Z
          =
          
            
              1
              
                ρτ
                +
                μ
              
            
            ⁢
            
              (
              
                
                  
                    (
                    
                      1
                      -
                      μ
                    
                    )
                  
                  ⁢
                  
                    
                  
                  ⁢
                  Z
                
                +
                
                  
                    (
                    
                      μ
                      -
                      ρ
                    
                    )
                  
                  ⁢
                  
                    W
                    _
                  
                
                +
                
                  ρ
                  ⁢
                  
                    
                  
                  ⁢
                  W
                
              
              )
            
          
        
      
    
  
   






 



7
 



  
    
      
        
          #
          ⁢
          update
          ⁢
          
            
          
          ⁢
          constants
        
      
    
    
      
        
          
            ρ
            =
            
              L
              +
              
                μ
                /
                δ
              
            
          
          ,
          
            τ
            =
            
              
                
                  
                    
                      4
                      ⁢
                      δ
                    
                    +
                    
                      δ
                      2
                    
                  
                
                -
                δ
              
              2
            
          
          ,
          
            δ
            =
            
              
                (
                
                  1
                  -
                  τ
                
                )
              
              ⁢
              δ
            
          
        
      
    
  
   






 








  
    Procedure
    ⁢
    
      :
    
    ⁢
    
      
    
    ⁢
    W
  
  :=
  
    ParamUpdate
    ⁢
    
      
    
    ⁢
    
      (
      
        
          X
          θ
        
        ,
        
          Y
          θ
        
        ,
        
          W
          _
        
        ,
        λ
        ,
        ρ
      
      )
    
  






 



1
 



  
    W
    ′
  
  =
  
    
      W
      _
    
    -
    
      
        1
        ρ
      
      ⁢
      
        ∇
        
          f
          ⁡
          
            (
            
              
                X
                θ
              
              ,
              
                Y
                θ
              
              ,
              
                W
                _
              
            
            )
          
        
      
      ⁢
      
        
      
      ⁢
      #
      ⁢
      gradient
      ⁢
      
        
      
      ⁢
      step
    
  






 











2
 W = [W]+
#projection to non-negative orthant



3
 W = ΠΩ(w, κ)
#proximal step









Without constraining the parameters, the memory required by a model scales linearly with the vocabulary size |V|. Any symbol in V observed in a given context is a positive example, while any symbol in V that does not appear in this context is a negative example. When adopting a log-linear language model, the negative examples are associated with a small negative gradient step in Equation (4), so that the solution is not sparse across multiple categories in general. On the other hand, by constraining the parameters to be positive (i.e., the set of feasible solutions  is the positive orthant), the projection step 2 in Algorithm 1 can be done with the same complexity, while maintaining sparse parameters across multiple categories. More precisely, the weights for the category k associated to a given context x, is always zeros if the category k never occurred after context x. A significant gain in memory (nearly |V|-fold for large context lengths) was obtained without loss of accuracy in experiments reported herein.
Some illustrative embodiments of the penalty function Ω(W) are set forth in the following.
Standard choices for the penalty function Ω(W) include the l1-norm and the squared l2-norm. The l1-norm typically leads to a solution that is sparse and easily interpretable, while the squared l2-norm leads to a non-sparse solution, which is generally more stable than the sparse solution provided by the l1-norm. The unweighted l2 and li penalties have been used in the context of log-linear language models (Chen et al., “A survey of smoothing techniques for ME models”, IEEE Transactions on Speeche and Audio Processing, vol. 8 no. 1 (2002); Goodman, “Exponential priors for maximum entropy models”, in Proc. North American Chapter of the Association of Computational Linguistics (2004)), reporting performances competitive with bi-gram and tri-gram interpolated Kneser-Ney smoothing.
In the following, it is shown that the proximal step can be independently distributed on each individual node. This property can be used to group parameter values corresponding to features that are always equal, that is to say the contexts which always occur in the same larger context (i.e. parents with a single child in the suffix tree). Nodes having always the same values in a suffix trie can be collapsed using Ukkonen's linear-time online suffix tree algorithm, leading to a proximal step with a complexity that scales linearly with the number of symbols seen in the corpus.
For unweighted l2 penalties, the proximal step is the element-wise rescaling of the vector, i.e. the proximal step




  
    ∏
    
      l
      2
      2
    
  
  ⁢
  
    (
    
      
        w
        t
      
      ,
      
        κ
        2
      
    
    )
  




is the element-wise rescaling operation:

wi(t+1)←wi(t)(1+κ)−1  (6)

For l1 penalties, the proximal step





  
    ∏
    
      l
      1
    
  
  ⁢
  
    (
    
      
        w
        t
      
      ,
      
        κ
        2
      
    
    )
  




is the soft-thresholding operator:

wi(t+1)←max(0,wi(t)−κ)  (7)

These projections have linear complexity in the number of features and can be encoded efficiently by grouping together features that will have the same value at every iteration of the optimization.

The l1 and squared l2 penalties do not account for the sequential dependencies in the data, treating suffixes of different lengths equally. For language models, this is inappropriate considering that longer suffixes are typically observed less frequently than shorter ones. Moreover, the fact that suffixes might be nested is disregarded in the l1 and squared l2 penalties.
As disclosed herein, by replacing the unstructured penalties with tree-structured norm penalties (see Zhao et al., “The composite absolute penalties family for grouped and hierarchical variable selection”, The Annals of Statistics vol. 37(6A) pages 3468-97 (2009); Jenatton et al., “Proximal methods for hierarchical sparse coding”, Journal of Machine Learning Research, pages 2297-2334 (2011)), these deficiencies are overcome. The tree-structured norms are based on the suffix trie or tree, where subtrees correspond to contexts of increasing lengths. As shown in experiments reported herein, this prevents model overfitting (unlike the unweighted l1 or squared l2 norm).
The tree-structured lpT norms are defined as follows. Let x be a training sequence. Group g(w,j) is the subvector of w associated with the subtree rooted at the node j of the suffix trie S(x). Further, let denote the ordered set of nodes of the tree T(x) such that for r<s, g(w,r)∩g(w,s)=Ø or g(w,r)⊂g(w,s). The tree-structured lp norm (also denoted herein as the lpT norm) is defined as follows:




  
    
      
        
          
            l
            p
            T
          
          ⁡
          
            (
            w
            )
          
        
        =
        
          
            ∑
            
              j
              ∈
              g
            
          
          ⁢
          
            
              
              
                g
                ⁡
                
                  (
                  
                    w
                    ,
                    j
                  
                  )
                
              
              
            
            p
          
        
      
    
    
      
        (
        8
        )
      
    
  




where ∥•∥p denotes the lp-norm. In illustrative embodiments disclosed herein, the cases of p=2 and p=∞ are considered. For these values of p, efficient optimization algorithms are available. The lpT-norms can be viewed as a group sparsity-inducing norms, where the groups are organized in a tree. This means that when the weight associated with a parent in the tree is driven to zero, the weights associated to all its descendants should also be driven to zero. The l∞T-norm also corresponds to a group thresholding operator.

For a structured lpT-norm, the proximal step (Equation (5)) amounts to residuals of recursive projections on the lq-ball in the order defined by  where lq-norm is the dual norm of lp-norm. (More particularly, the lp-norm and lq-norm are dual to each other if




  
    
      1
      p
    
    +
    
      1
      q
    
  
  =
  1.




The l2-norm is self-dual while the dual of the l∞-norm is the l1-norm.) In the case of the l2T-norm this amounts to a series of projections on the l2-ball. For the l∞T-norm it is instead projections on the l1-ball. The order of projections defined by  is generated by an upward pass of the suffix trie. At each node through the upward pass, the subtree below is projected on the dual norm ball of size κ, the parameter of the proximal step. The projections on the norm ball are further described in the following.

Each of the above projections on the dual norm ball takes one of the following forms depending on the choice of the norm. Projection of vector w on the l2-ball is equivalent to thresholding the magnitude of w by κ units while retaining its direction:




  
    
      
        w
        ←
        
          
            
              [
              
                
                  
                    
                    w
                    
                  
                  2
                
                -
                κ
              
              ]
            
            +
          
          ×
          
            w
            
              
                
                w
                
              
              2
            
          
        
      
    
    
      
        (
        9
        )
      
    
  




where [a]+ is a thresholding operator equaling 0 is a is negative and equaling a otherwise. This can be performed in time linear in size of w, O(|w|). Projection of a non-negative vector w on the l1-ball is more involved and requires thresholding by a value such that the entries in the resulting vector add up to κ, otherwise w remains the same:

w←[w−τ]+s.t.∥w∥1=κ or τ=0  (10)

The condition τ=0 is the case where w lies inside the l1-ball of size κ with ∥w∥1<κ, leaving w intact. In the other case, the threshold τ is to be computed such that after thresholding, the resulting vector has an l1-norm of κ. One way to achieve this is to sort by decending order the entries w=sort(w) and select the k largest values such that the (k+1)th largest entry is smaller than τ:





  
    
      
        
          
            
              
                ∑
                
                  i
                  =
                  1
                
                k
              
              ⁢
              
                
                  w
                  _
                
                i
              
            
            -
            τ
          
          =
          κ
        
        ⁢
        
          

        
        ⁢
        and
        ⁢
        
          

        
        ⁢
        
          τ
          >
          
            
              w
              _
            
            
              k
              +
              1
            
          
        
      
    
    
      
        (
        11
        )
      
    
  




The parameter wk is referred to herein as the pivot. Only entries larger than the pivot wk are of interest. Given a sorted vector, it requires looking up to exactly k entries, however, the sorting process itself takes O(|w|log|w|).











Algorithm 2 w := Πl2T (w, κ) Proximal projection


step for l2T on grouping   .
















1
Input: T suffix tree, w trie-structured vector, κ threshold


2
Initialize: {γi} = 0, {ηi} = 1


3
η = UpwardPass(η, γ, κ, w)


4
w = DownwardPass(η, w)



Procedure: η := UpwardPass(η, γ, κ, w)


1
for x ∈ DepthFirstSuffixTraversal(T, PostOrder)








2
γx = wx2 + Σh∈children(x) γh


3
ηx = [1 − κ/ {square root over (γx)}]+


4
γx = ηx2γx









Procedure: w := DownwardPass(η, w)


1
for x ∈ DepthFirstSuffixTraversal(T, PreOrder)








2
wx = ηxwx


3
for h ∈ children(x)








4
ηh = ηxηh








a
DepthFirstSuffixTraversal(T,Order) returns observed suf-



fixes from the suffix tree T by depth-first traversal in the order



prescribed by Order.


b
wx is the weights corresponding to the suffix x from the



weight vector w and children(x) returns all the immediate



children to suffix x in the tree.









Naively employing the projection on the l2-ball described above leads to an O(d2) algorithm for l2T proximal step. This could be improved to a linear algorithm by aggregating all necessary scaling factors while making an upward pass of the trie S and applying them in a single downward pass as described in Jenatton et al., “Proximal methods for hierarchical sparse coding”, Journal of Machine Learning Research, pages 2297-2334 (2011). In Algorithm 2, this procedure is detailed for trie-structured vectors.










Algorithm 3 w := Πl∞T (w, κ) Proximal projection


step for l∞T on grouping   .

















 

Input: T suffix tree, w = [υ c] tree-structured vector υ with




corresponding number of suffixes collapsed at each node in




c, κ threshold



1
for x ∈ DepthFirstNodeTraversal(T, PostOrder)



2
  g(υ, x) := πl∞T (g(υ, x), cxκ)




Procedure: q := πl∞ (q, κ)




Input: q = [υ c], qi = [υi ci], i = 1, . . . , |q|




Initialize: U = { }, L = { }, I = {1, . . . , |q|}



1
while I ≠ Ø











2
 pick random ρ ∈ I
#choose pivot



3
  U = {j|υj ≧ υρ}
#larger than υρ



4
  L = {j|υj < υρ}
#smaller than υρ










5
  δS = Σi∈U υi · ci, δC = Σi∈U ci



6
  if (S + δS) − (C + δC)ρ < κ



7
   S := (S + δS), C := (C + δC), I := L



8
  else I := U\{ρ}


 



9




  
    r
    =
    
      
        S
        -
        κ
      
      C
    
  
  ,
  
    
      υ
      i
    
    :=
    
      
        υ
        i
      
      -
      
        
          max
          ⁡
          
            (
            
              0
              ,
              
                
                  υ
                  i
                
                -
                r
              
            
            )
          
        
        ⁢
        
          
        
        ⁢
        #
        ⁢
        take
        ⁢
        
          
        
        ⁢
        residuals
      
    
  









a DepthFirstNodeTraversal(T, Order) returns nodes x from the suffix tree T by depth-first traversal in the order prescribed by Order.






The complexity of l∞T-norm proximal step depends directly on that of the pivot finding algorithm used within its l1-projection method. Naively sorting vectors to find the pivot leads to an O(d2 log d) algorithm. Pivot finding can be improved by randomly choosing candidates for the pivot, and a known algorithm using this approach (Bruckner, “An o(n) algorithm for quadratic knapsack problems”, Operations Research Letters, vol. 3 pages 163-166 (1984)) has amortized linear time complexity in the size of the vector. This provides O(d2) complexity for l∞T-norm proximal step. Another approach (Duche et al., “Efficient projections onto the l1-ball for learning in high dimensions”, Proc. 25th Int. Conf. Machine Learning (2008)) proposes a method that scales linearly with the number of non-zero entries in the gradient update (s) but logarithmically in d. But recursive calls to l1-projection over subtrees will fail the sparsity assumption (with s≈d) making proximal step quadratic. A suitable procedure for Πl∞T on trie-structured vectors using randomized pivoting method is set forth in Algorithm 3.
In the following, approaches are disclosed for reducing the number of l1-projections by switching to the tree T instead of trie S which is possible due to advantageous properties of the l∞T-norm. A pivot finding method is then disclosed that is logarithmic in the feature size for the illustrative language modeling application.
The case is considered in which all parameters are initialized with the same value for the optimization procedure, typically with zeros. The condition that the parameters at any given node continue to share the same value requires that both the gradient update of Equation (4) and the proximal step of Equation (5) have this property. To achieve this, the tree structure is modified to ensure that after gradient updates parameters at a given node continue to share a single value. Nodes that do not share a value after gradient update are split into multiple nodes where each node has a single value. This property is formally defined as follows. A constant value non-branching path is a set of nodes Pε(T,w) of a tree structure T with respect to vector w if P has |P| nodes with |P|−1 edges between them and each node has at most one child and all nodes i,jεP have the same value in vector w as wi=wj.
With reference again to FIGS. 2 and 3, the nodes of the tree T of FIG. 3 correspond to constant value non-branching paths when the values for all parameters at each of the nodes are the same. In the following it is shown that this tree structure is retained after proximal steps of l∞T-norm.
With continuing reference to FIGS. 2 and 3 and with further reference to FIGS. 4 and 5, the following proposition is shown: Proposition 1: Constant value non-branching paths (T,w) of T structured vector w are preserved under the proximal projection step Πl∞T(w,κ). For illustration, FIG. 2 shows an example of an uncollapsed (trie), and FIG. 3 shows the corresponding collapsed (tree) structured vectors and proximal operators applied to them. Weight values are written inside the node. FIG. 2 shows the complete trie S. FIG. 3 shows the corresponding collapsed tree T. The number in the brackets shows the number of nodes collapsed. FIG. 4 shows the vector after proximal projection for the l2T-norm, which cannot be collapsed. FIG. 5 shows the vector after proximal projection for the l∞T-norm, which can be collapsed.
FIG. 5 illustrates Proposition 1, showing l∞T projection applied on the collapsed tree. This makes it memory efficient but the time required for the proximal step remains the same since each subtree of the trie S must be projected on the l1-ball. The sequence of projections at nodes of S in a non-branching path can be rewritten into a single projection step using the following technique bringing the number of projections from |S| to |T|.
Proposition 2: Successive projection steps for subtrees with root in a constant value non-branching path P={g1, . . . , g|P|}ε(T,w) for Πl∞T(w,κ) is πg|P|∘ . . . ∘πg1(w,κ) applied in bottom-up order defined by . The composition of projections can be rewritten into a single projection step with κ scaled by the number of projections |P|, as:

πg|P|(w,κ|P|)≡πg|P|∘ . . . ∘πg1  (12)

The above propositions show that l∞T-norm can be used with the suffix tree T with fewer projection steps. In the following, a fast proximal step algorithm for l∞T-norm is described.
Let k be the cardinality of the set of values larger than the pivot in a vector to compute the threshold for l1-projection as referred in Equation (11). This value varies from one application to another, but for language applications, experiments reported herein on 100,000 English words (APNews dataset) showed that k is generally small: its value is on average 2.5, and its maximum is around 10 and 20, depending on the regularization level. In the illustrative embodiments, a max-heap data structure (Cormen et al., An introduction to Algorithms, MIT Press 1990) is employed to fetch the k-largest values necessary to compute the threshold. Given the heap of the entries the cost of finding the pivot is O(k log d) if the pivot is the kth largest entry and there are d features. This operation is performed d times for l∞T-norm as the tree is traversed bottom-up. The heap itself is built on the fly during this upward pass. At each subtree, the heap is built by merging those of their children in constant time by using Fibonacci heaps. This leaves us with a O(dk log d) complexity for the proximal step. This procedure is detailed in Algorithm 4.
Table 1 summarizes the characteristics of the algorithms associated to the different penalties. In Table 1, generalization properties are as compared by their performance with increasing context length. Memory efficiency is measured by the number of free parameters of W in the optimization. Note that the suffix tree is much smaller than the trie (uncollapsed tree), that is, |T|<<|S|. Time complexities reported are that of one proximal projection step.
The unstructured lp-norms do not take into account the varying sparsity level with context length. For p=1, this leads to a sparse solution. For p=2, the classical quadratic penalty is obtained. The suffix tree representation leads to an efficient memory usage. Furthermore, to make the training algorithm time efficient, the parameter values corresponding to features that are always equal, that is to say the contexts which always occur in the same larger context, can be grouped. However, the corresponding losses would be data dependent. This becomes particularly important when considering online algorithms (see, e.g. Dekel et al., “Individual sequence prediction using memory-efficient context trees”, IEEE Trans. On Information Theory vol. 55(11), pp. 5251-62 (2009)) when a group could be split upon making new observations. Experiments reported herein illustrate that these penalties do not lead to good predictive performances.










Algorithm 4 w := Πl∞T (w, κ) Proximal projection


step for l∞T on grouping     using heap data structure.

















 

Input: T suffix tree, w = [υ c] tree-structured vector υ with




corresponding number of suffixes collapsed at each node in




c, κ threshold




Initialize   = { } # empty set of heaps



1
for x ∈ DepthFirstNodeTraversal(T, PostOrder)




 g(υ, x) := πl∞T (w, x, cxκ,  )




Procedure: q := πl∞ (w, x, κ,  )



1
 x = NewHeap(υx, cx, υx)











2
for j ∈ children(x)
  # merge with child heaps




 τx = τx + τj
  # update l1-norm











  x = Merge( x,  j),   =   /  j



3
  =   ∪ Hx, S = 0, C = 0, J = { }



4
if   x (τ) < κ, set   x = 0 return











5
for j ∈ OrderedIterator( x)
  # get max values


 











 



  
    if
    ⁢
    
      
    
    ⁢
    
      υ
      j
    
  
  >
  
    
      S
      +
      
        (
        
          
            υ
            j
          
          ·
          
            c
            j
          
        
        )
      
      -
      κ
    
    
      C
      +
      
        c
        j
      
    
  






 




  S = S + (υj · cj), C = C + cj, J = J ∪ {j}












 else break



 



6




  
    r
    =
    
      
        S
        -
        κ
      
      C
    
  
  ,
  
    δ
    =
    0
  




# compute threshold


 



7
for j ∈ J
# apply threshold











 v = min(υj, r), δ = δ + (υj − v)




  j (υ) = v











8
 x (τ) =  j (τ) − δ
# update l1-norm





a. Heap structure on vector w holds three values (υ, c, τ) at each node. υ, c being value and its count, τ is the l1-norm of the sub-vector below. Tuples are ordered by decreasing value of υ and  j refers to heap with values in sub-tree rooted at j. Merge operation merges the heaps passed. OrderedIterator returns values from the heap in decreasing order of υ.






The l2T-norm nicely groups features by subtrees which concors with the sequential structure of sequences. This leads to a powerful algorithm in terms of generalization. But it can only be applied on the uncollapsed tree since there is no closure property of the constant value non-branching path for its proximal step making it less amenable for larger tree depths.
The l∞T-norm groups features like the l2T-norm. Additionally, however, the l∞T-norm encourages numerous feature groups to share a single value, leading to a substantial reduction in memory usage. The generalization properties of this algorithm is as good as the generalization obtained with the l2T penalty, if not better. However, it has the constant value non-branching path property, which means that the proximal step can be applied directly to the suffix tree. There is thus also a significant gain of performance.










TABLE 1






Good
Memory
Time


Penalty
generalization?
efficient?
efficient?







Unstructured l1 and l22
No
Yes
Yes




O(|T|)
O(|T|)


Structured l2T
Yes
No
No




O(|S|)
O(|S|)


Structured lT∞ - random pivot
Yes
Yes
No




O(|T|)
O(|T|2)


Structured lT∞ - heap
Yes
Yes
Yes




O(|T|)
O(|T|log|T|)









With returning reference to FIG. 1, a language model learning system employing one of the disclosed language learning techniques disclosed herein is described. The language model learning system operates on the corpus 20 (optionally preprocessed, operation not shown in FIG. 1, for example as described for experiments reported herein), and minimizes the loss-log objective 12 (Equation (2)) including the penalty function 14 (Ω(W)) employing a tree-structured lp-norm, such as l2T or l∞T. A suffixes extraction module 30 operates on the corpus 20 to extract the suffixes (i.e. contexts) to a designated maximum depth 32 (denoted m herein) from the sentences of the corpus 20. The suffixes extraction module 30 includes a suffix tree encoder 34 that encodes the suffixes in uncollapsed trie structures S and/or collapsed tree structures T (by operation of a suffix tree collapse component 36 of the suffix tree encoder 34, for example suitably operational when the penalty function 14 employs a tree-structured l∞T-norm).
One illustrative approach for mapping a sequence x to its feature vector φm(x) is as follows. Let xk denote the suffix of length k of the sequence x, that is, xk is the sequence of the last k symbols in x. If x is followed by y, then the set of suffixes {xk}k=1n {xk}k=1n defines the context in which y is observed. Further, let ξk denote the lexicographically ordered set of all length-k sequences formed with the elements of V. For example, the set ξ2 for V={a, c, o} is given by {aa, ac, ao, ca, cc, co, oa, oc, oo}. A mapping from sequences x to binary vectors ψk(x) indicating the location of the suffix xk in the set ξc is defined as:

ψk(x)=[(ξk(1)=xk)(ξk(2)=xk) . . . (ξk(|V|k)=xk)]T  (13)

Where (•) is the indicator function. For example, for x=oacac and x2=ac, Equation (13) yields ψ2(x)=[010000000]T. The feature vector φm(x) encodes all suffixes observed in x up to length m. It is obtained by stacking a weighted version of the corresponding binary vectors {ψk(x)}k=1m:

φm(x)=[β(0)ψ0(x)Tβ(1)ψ1(x)T . . . β(m)ψm(x)T]T.  (14)

where the function (k) weighs suffixes depending on their length k. If β(k)=1 is chosen for all k, then the suffixes of all lengths are equally weighted. The first entry ψ0 is a non-zero value indicating the null context. Moreover, φm(x) discards all suffixes longer than m, restricting the maximal length of the context. φm(x) encodes occurrences of various suffixes, while the parameters W provide a weighting of the context of different length. However, the dimension of the feature space Σk=1m|V|k, meaning that the number of entries in W becomes rapidly unmanageable using standard data structures when the context length increases (as the vocabulary size |V| is typically in the order of 104 or larger in language models). This causes storage and computational issues, at training and test time. However, in practice φm(xy) has only m non-zeros elements due to the sequential dependencies between successive symbols. Suffix trees are well suited to encode these data.

With reference to FIGS. 6 and 7, the feature vector φm(x) encodes suffixes (or contexts) of increasing length and it corresponds to one path of length m starting at the root of S(x). Thus, when building the log-linear language model, it is sufficient to consider weight vectors of size |S(x)|. In other words, there is one weight parameter per suffix per symbol and the matrix of parameters W is of size |S(x)∥V|. As illustrated in FIGS. 6 and 7, each column of W contains the weight vector wv associated with symbol vεV and |S(x)|=13 (for the illustrative example of m=13). The dimension of the weight vectors is bounded by the length of the training sequence. Hence, the model can be used as an infinite length language model, though in practice it makes sense to restrict dependency to the sentence length (or the document length). In illustrative FIGS. 6 and 7, the example sequence x=oacac and a vocabulary V={a,c,o} is considered as a simple example. The set {j}j=113 contains all the suffixes appearing in the sequence x. In FIG. 6, left side, the suffix tree T(x) is shown. In FIG. 6, right side, the matrix W associated with the corresponding suffix trie is shown. In FIG. 7, left side, word-specific suffix trees {Tv(x)}vεV are shown. In FIG. 7, right side, constrained matrix W associated with the word-specific suffix tries are shown.
Making use of the suffix trie encoding additionally offers the computational benefit of efficient matrix-vector (or vector-vector multiplication). Indeed, each inner product wvTφm(x) reduces to (i) finding the longest suffix of x of maximal length m in S(x), (ii) extracting the corresponding entries of and (iii) summing them after proper scaling with β(•). Again, this is a substantial gain as the longest suffix of x is much smaller than |S(x)| and summations over weights that are irrelevant in a specific context are avoided.
With continuing reference to FIG. 1, a proximal gradient objective optimization module 40 optimizes Equation (2) with respect to W as disclosed herein, for example using the proximal projection step of Algorithm 2 if the penalty 14 is the structured l2T-norm, the proximal projection step of Algorithm 3 if the penalty 14 is the l∞T-norm and random pivot is employed, or the proximal projection step of Algorithm 4 if the penalty 14 is the l∞T-norm and a heap data structure is used. The resulting trained log-linear language model 10 is suitably used as the language model module in an application 44 such as a speech recognition application, machine translation application, information retrieval application, and so forth.
The processing components shown in FIG. 1 are implemented by an illustrative computer 50 or other electronic data processing device programmed to perform the disclosed processing. Additionally or alternatively, the disclosed language model learning and application approaches are suitably embodied by a non-transitory storage medium storing instructions executable by the illustrative computer 50 or other electronic data processing device to perform the disclosed language model learning and application approaches. The non-transitory storage medium may, for example, comprise a hard disk or other magnetic storage medium, an optical disk or other optical storage medium, a random access memory (RAM), read-only memory (ROM), flash memory or other electronic storage medium, various combinations thereof, or so forth.
In the following, experiments are described that demonstrate empirically the properties of the algorithms summarized in Table 1. Four distinct subsets of the Associated Press News (AP-news) text corpus are considered, with train-test sizes of 100,000 to 20,000 for the reported experiments. The corpus was preprocessed as described in Bengio et al., “A neural probabilistic language model”, Journal of Machine Learning Research vol. 3 pages 1137-55 (2003), by replacing proper nouns, numbers and rare words with special symbols “<proper noun>”, “#n” and “<unknown>” respectively. Punctuation marks are retained which are treated like other normal words. Vocabulary size for each of the training subsets was around 8,500 words. The model was reset at the start of each sentence, meaning that a word in any given sentence does not depend on any word in the previous sentence. The regularization parameter λ was chosen for each model by cross-validation on a smaller subset of data. Models were fitted to training sequence of 30,000 words for different values of λ and validated against a sequence of 10,000 words to choose λ.
The experimental results were quantitatively evaluated using perplexity, which is computed as follows:




  
    
      
        
          P
          ⁡
          
            (
            
              
                {
                
                  
                    x
                    i
                  
                  ,
                  
                    y
                    i
                  
                
                }
              
              ,
              W
            
            )
          
        
        =
        
          10
          
            {
            
              
                
                  -
                  1
                
                
                  n
                  V
                
              
              ⁢
              
                
                  ∑
                  
                    i
                    =
                    1
                  
                  n
                
                ⁢
                
                  
                    I
                    ⁡
                    
                      (
                      
                        
                          y
                          i
                        
                        ∈
                        V
                      
                      )
                    
                  
                  ⁢
                  log
                  ⁢
                  
                    
                  
                  ⁢
                  
                    p
                    ⁡
                    
                      (
                      
                        
                          
                            y
                            i
                          
                          ❘
                          
                            x
                            
                              1
                              :
                              i
                            
                          
                        
                        ;
                        W
                      
                      )
                    
                  
                
              
            
            }
          
        
      
    
    
      
        (
        15
        )
      
    
  




where nV=Σi(yiεV). Performance was measured for varying depth of the suffix trie with different penalties. Interpolated Kneser-Ney results were computed using the openly available SRILM toolkit (Stolcke, “Srilm—an extensible language modeling toolkit”, Proc. Int. Conf. Spoken Language Processing, 2nd edition (2002)).

FIG. 8 shows perplexity values averaged over four data subsets as a function of the language model order. It can be observed that performance of unstructured l1 and squared l2 penalties improve until a relatively low order and then degrade, while l2T penalty does not show such degradation, indicating that taking the tree-structure into account is beneficial. Moreover, the log-linear language model with l2T penalty performs similar to interpolated Kneser-Ney. The l∞T-norm outperforms all other models at order 5, but taking the structure into account does not prevent a degradation of the performance at higher orders, unlike l2T. This could be explained by the fact that l∞T-norm is not sparsity-inducing, unlike the l2T-norm, which means that a single regularization for all model orders is inappropriate.
To investigate this further, the penalties were adjusted by choosing an exponential decrease of weights varying as αm for a feature at depth m in the suffix tree. Parameter α was tuned on a smaller validation set. The best performing values for these weighted models wl22, wl1, wl2T, and wl∞T are 0.5, 0.7, 1.1, and 0.85 respectively. The weighting scheme further appropriates the regularization at various levels to suit the problem's structure.
Perplexity plots for weighted models are shown in FIG. 9. While wl1 improves at larger depths, it fails to compare to others showing that the problem does not admit sparse solutions. wl22 improves considerably and performs comparably to tree-structured norms. wl∞T is corrected for overfitting at larger depths and wl2T gains more than others. Optimal values for α are fractional for all norms except wl2T-norm showing that the unweighted model l2T-norm was over-penalizing features at larger depths, while that of others were under-penalizing them. Interestingly, perplexity improves up to about 9-grams with wl2T penalty for the considered data set, indicating that there is more to gain from longer dependencies in natural language sentences than what is currently believed.
FIG. 10 shows model complexity measured by the number of parameters in the model. The l2T penalty is applied on trie-structured vectors, which grows roughly at a linear rate with increasing model order. This is similar to Kneser-Ney. However, the number of parameters for the wl∞T penalty grows logarithmically with the model order. This is due to the fact that it operates on the suffix tree-structured vectors instead of the suffix trie-structured vectors. These results are valid for both weighted and unweighted penalties.
With reference to FIGS. 11 and 12, the average time taken per iteration is compared for different implementations of the l∞T proximal step. FIG. 11 shows this time against increasing depth of the language model order for random pivoting method with and without the collapsing of parameters at different constant value non-branching paths. The trend in this plot resembles that of the number of parameters in FIG. 10. This shows that the complexity of the full proximal step is sublinear when accounting for the suffix tree data structure. FIG. 12 plots time per iteration for random pivoting and for k-best heap against the varying size of training sequence. The two algorithms are operating directly on the suffix tree. It is observed that the heap-based method are superior with increasing size of training data.
It will be appreciated that various of the above-disclosed and other features and functions, or alternatives thereof, may be desirably combined into many other different systems or applications. Also that various presently unforeseen or unanticipated alternatives, modifications, variations or improvements therein may be subsequently made by those skilled in the art which are also intended to be encompassed by the following claims.

## Claims

1. A non-transitory storage medium storing instructions readable and executable by an electronic data processing device to perform a method of generating a language model for a natural language including the operations of:
optimizing a penalized loss argminw ƒ(W)+λΩ(W) using a corpus of language samples of the natural language respective to a set of parameters W={wv}vεV of a language model, where V is a vocabulary of the natural language, ƒ(W) is a function measuring predictive accuracy of the language model respective to the corpus of language samples, Ω(W) is a penalty comprising a tree-structured norm, and λ is a regularization parameter; and
outputting a trained language model for the natural language with optimized values for the parameters W generated by the optimizing.

2. The non-transitory storage medium of claim 1 wherein the penalty Ω(W) comprises lpT(w)=Σjε∥g(w,j)ƒp where ∥•∥p denotes the lp-norm, g(w,j) is the sub-vector of w associated with the subtree rooted at node j of the suffix trie of a language sample of the corpus, and  is an ordered set of nodes of the suffix trie.

3. The non-transitory storage medium of claim 2 wherein the penalty Ω(W) comprises 4(w)=Σjε∥g(w,j)∥2 where ∥•∥2 denotes the l2-norm.

4. The non-transitory storage medium of claim 2 wherein the penalty Ω(W) comprises l∞T(w)=Σj68 ∥g(w,j)∥∞ where ∥•∥∞ denotes the l∞-norm.

5. The non-transitory storage medium of claim 4 wherein the suffix trie comprises a collapsed suffix trie in which any series of suffixes of increasing lengths which are always observed in the same context are collapsed into a single node.

6. The non-transitory storage medium of claim 1 wherein ƒ(W):=−Σi=1n ln p(yi|x1:i; W) where the summation is over n language samples of the corpus and p(yi|x1:i; W) denotes the probability of word yi following suffix x1:i predicted by the language model with parameters W.

7. The non-transitory storage medium of claim 1 wherein the optimizing is performed using a proximal step algorithm.

8. The non-transitory storage medium of claim 7 wherein the optimizing is performed using a stochastic proximal step algorithm.

9. The non-transitory storage medium of claim 7 wherein the penalty Ω(W) comprises l∞T(w)=Σjε∥g(w,j)∥∞ where ∥•∥∞ denotes the l∞-norm, g(w,j) is the sub-vector of w associated with the subtree rooted at node j of the suffix trie of a language sample of the corpus, and  is an ordered set of nodes of the suffix trie.

10. The non-transitory storage medium of claim 9 wherein the optimizing implements the proximal step algorithm using a max-heap data structure.

11. An apparatus comprising:
a non-transitory storage medium as set forth in claim 1; and
an electronic data processing device operatively connected to read and execute the instructions stored on the non-transitory storage medium.

12. A method comprising:
optimizing a penalized loss using a corpus of language samples of a natural language respective to a set of parameters of a language model wherein the penalized loss includes a function measuring predictive accuracy of the language model respective to the corpus of language samples and a penalty comprising a tree-structured norm to generate a trained language model for the natural language; and
applying the trained language model with optimized values for the parameters generated by the optimizing to predict a word following a sequence of words of the natural language modeled by the trained language model;
wherein the optimizing and the applying are performed by an electronic data processing device.

13. The method of claim 12 wherein the penalty comprises a tree-structured lp-norm.

14. The method of claim 13 wherein the penalty comprises a tree-structured l2-norm.

15. The method of claim 13 wherein the penalty comprises a tree-structured l∞-norm.

16. The method of claim 15 wherein the tree-structured l∞-norm operates on a collapsed suffix trie in which any series of suffixes of increasing lengths which are always observed in the same context are collapsed into a single node.

17. The method of claim 12 wherein the optimizing is performed using a proximal step algorithm.

18. The method of claim 17 wherein the optimizing is performed using a stochastic proximal step algorithm.

19. The method of claim 17 wherein the penalty comprises a tree-structured l∞-norm operating on a collapsed suffix trie in which any series of suffixes of increasing lengths which are always observed in the same context are collapsed into a single node.

20. The method of claim 19 wherein the optimizing implements the proximal step algorithm using a max-heap data structure.